You are on page 1of 6

Adopted from Quality Web Systems 2002 Pearson Education, Inc.

Reproduced by permission.

Web System At a Glance:

• Performance and Scalability Explained


• Requirements

Performance • Verifying Site Performance and Scalability


• Test Types
• Configurations
• Verification Phases

and Scalability • Common Pitfalls

by Elfriede Dustin

Performance and scalability are top con- • Performance and scalability require- Performance: Web system performance
cerns cited by information technology (IT) ments, which must be defined in the can be described from two perspectives.
managers as they prepare to deploy new context of the site’s expected usage To an end user, response time is the
Internet and intranet applications for their basic measure used to judge the quality
organizations. But often it is not appar- • Evaluation strategy, which entails of a Web site’s performance.
ent what the performance and scalabili- gathering data on the site’s performance Administrators, on the other hand, are
ty requirements for a Web site should be and scalability behavior concerned not only with response time
or how performance and scalability but also with the site’s resource utiliza-
needs should be verified. • Verification phases, or the steps tion. Response times increase as the
required for conducting essential per- number of users increases, owing to
The ability of a Web system to deliver formance and scalability testing higher levels of resource utilization on
content to an ever-changing number of the system’s servers and network.
simultaneous Web users is one of its Performance and Response time can also be affected by
most important features. Building and Scalability Explained factors not related to user load, such as
delivering a Web system that can serv- Web system performance and scalabili- database size and poor software imple-
ice its customers in a timely fashion is ty are closely related. As such, they mentation. Web system end users typi-
critical to the survival of a business must be measured together in order to cally perceive response time to be the
Web site. A Web system that feels slow obtain an accurate picture of the Web amount of time taken from the moment
may give the customer a negative system’s capability to service users they click the mouse to the moment that
impression of the business and may under various conditions. To properly a new Web page has been fully dis-
give that customer cause to seek out a grasp the importance of scalability, it is played on the screen. Based on this per-
competing system. Beyond the subjec- first necessary to understand the impli- ceived time, users may judge system
tive feel of the system is the capability cations of performance on a Web sys- performance as too sluggish.
of the site to carry out the requests of tem, and that requires understanding the
the user in a timely fashion, with opti- terms that apply to Web system per- Scalability: Web system scalability is
mal use of system resources. This arti- formance and scalability. the ability to add computing resources
cle will address the following topics: to a site in order to obtain acceptable or
improved response time, stability, and

September/December 2001 http://www.testinginstitute.com Journal of Software Testing Professionals 17


throughput under a particular load. In Performance and • Normal versus peak: The effect of
this context, load refers to the number Scalability Requirements these figures on the three previous fac-
of users accessing the site at the same Performance and scalability require- tors. For example, a site may experi-
time. As more users access the site, the ments are used to judge whether the site ence a normal user load of 300 concur-
site’s servers will use more of their will perform properly under various rent users, but that load will at times
CPU, input/output (I/O), and memory conditions of load. These requirements climb as high as 1,000 users. With that
resources to handle the load. are used as a basis for determining load, it may be acceptable for the Web
Eventually, one or more of these whether the site is capable of meeting system to experience a small degrada-
resources will become saturated, mean- the expectations of the system’s cus- tion in response time.
ing that the system cannot efficiently tomer base. Such requirements are also
process all the requests and must force used to support scalability and cost • Degradation under stress: The specif-
some to wait for processing. In most analysis. The following are commonly ic degradation that occurs when system
cases, the computer’s CPU will be the used criteria for defining performance load capacity is exceeded. For example,
first component to become saturated. and scalability requirements: how many users get partial, or broken,
The end result of a saturated server pages under this condition? Measures
resource is an increase in response time. • Response time: A major performance collected might indicate, for example,
Scaling allows the site to cope with gauge for a Web site. Many factors con- that 5 percent of system users get
additional load by providing more tribute to a Web site’s response time, incomplete Web pages under a load of
resources to process requests. The tiers, and some are outside the Web site’s 1,000 concurrent users versus 10 per-
or groups of servers, of a typical Web control, such as the speed of an Internet cent when load is increased to 1,500
system can be scaled as follows connection for a user. Because many simultaneous users. Additionally, the
(Microsoft 1999b): Internet users use modems, the response Web site’s stability should be evaluated
time may need to be adjusted for to make sure that server processes do
• Vertical scaling is achieved by modem speed. For example, an accept- not crash or corrupt data while under
upgrading or replacing a server with able response time goal for a 56K various levels of stress. S
more powerful components or an modem user might be 6 seconds, where-
entirely new, larger server. Vertical scal- as the goal for a user accessing the • Reliability: A Web system’s perform-
ing can usually be achieved with little Internet via a T1 line might be 2 sec- ance following long use versus that dur-
or no software modification. Although onds. ing its first 24 hours of use. This type of
minor server upgrades, such as a faster requirement statement defines the time
processor or more memory, are not very • Required number of concurrent users: period for which a Web site must per-
costly, the cost of large-scale system The ability to support a large number of form at certain response time levels in
replacement can be astronomical. concurrent users with little or no degra- order to be viewed as reliable for pro-
dation in response time. Quantifying the duction use. For example, the duration
• Horizontal scaling refers to the ability appropriate number of users is difficult, may be defined as a week, during which
to add more servers to a Web system but such measures can be derived by time the performance numbers and sta-
configuration. This usually requires the examining similar sites, performing bility measurements should be relative-
site’s architecture to support such scal- market research, or, possibly, looking at ly constant. The definition of a reliabil-
ing, as software issues may arise when existing non-Web products. When a ity requirement should take into
multiple machines are used. Web site has already gone live, statistics account such factors as regular mainte-
can be obtained from the Web server nance intervals that will restart the site’s
• Functional scaling involves the sepa- logs to determine typical usage patterns. machines.
ration of groups of functions, such as
catalog browsing and purchasing opera- • Cost: The number of servers and the
Verifying Site Performance
tions, onto different groups of servers, administration time required (Menasce and Scalability
allowing for more accurate horizontal and Almeida 1998, p. 68). When such The goal of performance and scalability
and vertical scaling techniques. costs are too high, architectural changes testing is to monitor and report on the
or component optimization must be site’s behavior under various load con-
considered. ditions. This data will be used later to
analyze the state of the Web site and to
plan for growth based on expectations

18 Journal of Software Testing Professionals http://www.testinginstitute.com September/December 2001


of additional load. This data will also formance testing, the component’s • Reliability testing is used to verify that
allow costs associated with the project- developer will typically need to investi- no hidden opportunities for failure
ed growth to be calculated, based on the gate the problem and correct any com- exist. Memory leaks, disk file issues, or
required capacities and performance of ponents prior to the execution of any database transaction log size are prob-
the site. Formal performance and scala- load tests using those components. lems that may surface only after the sys-
bility tests are typically conducted at tem has been running for long periods
the end of a development iteration, after • Load behavior is one of the most of time (Rational Software Corporation
the functional tests and any corrections important areas of analysis. The goal of 1999).
have been performed, as these problems load testing is to simulate real-world
may alter the results of the performance usage to determine response time and Configurations
tests. It is best practice to conduct infor- server resource use, allowing the calcu- Performance-related tests are executed
mal performance monitoring through- lation of a maximum number of site with various configuration elements:
out the development effort, whereas the users per machine. To simulate real
formal tests are used to validate users, scripts are created that tie togeth- • Server hardware and number of
whether performance-related require- er many common user actions into vir- servers. In order to properly obtain per-
ments have been satisfied. tual sessions. Bottlenecks in the system formance and scalability measures for a
will usually become apparent during Web site, load and stress tests should be
In order to ensure accurate test execu- this type of test. Load testing is also run using various configurations of
tion and results gathering, an automated performed with single operations, or server hardware and with various num-
testing tool should be used to execute use cases, in order to help locate per- bers of servers at each tier. Consider, for
the performance tests. It’s almost formance issues with specific compo- example, using two Web servers, one
impossible to conduct performance test- nents under load. Load testing is per- application server, and one database
ing without the use of tools, which can formed incrementally, with a fixed server; single-processor and multi-
simulate thousands of simultaneous number of users added per increment. processor Web servers; and separate
users. Many tools are available for this As users are added, the response time Web and application server machines
purpose. Test tools can greatly assist in and server resource use values will versus a collocated Web/application
the creation of test scripts and the mon- increase. Obtaining these performance server. It is important to test the system
itoring of end user response times. In measures helps facilitate planning, as using the base configuration in order to
addition, load-testing tools typically the maximum number of site users sup- assist in determining scalability. A base
have a large number of options, includ- ported by the system may not be accept- configuration should generally include
ing think time and connection speed, to able for future needs. Also, analysis the minimum number of servers
more accurately simulate end user inter- may indicate that the site needs to be required for the site to function. For
action with the system. scaled in order to accommodate defined example, a site’s base configuration
performance requirements. may consist of one Web server; one
Test Types application server, if used; and one
Four major types of performance-relat- • Stress testing too consists of simulat- database server. Measures of perform-
ed tests need to be considered: ing access to a Web site by multiple ance obtained under this configuration
users. Stress testing, however, seeks to are useful in scalability analysis, as the
• Base performance testing determines determine the behavior of the system measures collectively provide a base
the response time and server resource once it reaches load limits, when the unit of scalability for the site.
usage of each system function (use server can no longer cope with the load.
case) individually under optimal system When system load approaches its • Database size. It is vital to execute
conditions. This type of test is per- threshold, the system may reject users each type of test using multiple data-
formed with only one user, to uncover or return incomplete pages, or compo- base sizes, in order to determine how
any immediate performance issues with nents and services may crash. Most they impact system performance and
components in the use case. If poor Web sites strive for graceful degrada- whether any database schema or config-
results are recorded for a use case dur- tion under load, through the action of uration changes are necessary. Schema
ing the base performance test, it is simply rejecting users instead of bring- design, database configuration options,
almost certain to display problems dur- ing the entire site down. Stress testing and the use of indexes can have a sig-
ing load tests. When performance prob- can help determine when the system nificant performance impact when
lems are identified during base per- should initiate such corrective action. operating on a table with a large number

September/December 2001 http://www.testinginstitute.com Journal of Software Testing Professionals 19


of records. As a result, it is important to function and tied together to simulate ance test. To create a test scenario for
factor database size into the perform- those sessions. Finally, the test scripts base performance, for example, criteria
ance-related tests in order to make sure are executed against the system. The must be selected for each element appli-
that the site performs acceptably with duration of tests will depend on the cable to that type.
large data sets. complexity of the Web site and the
number of test scenarios. • Base performance tests, the first to be
• Location of test client machines. executed, measure the response time of
Ideally, the site should be tested from Test Planning: The three major ele- a component accessed by a single user
both inside and outside the site’s net- ments required for conducting perform- under optimal conditions. Site opera-
work and firewall to uncover any net- ance and scalability test planning are tions, or «interface» use cases, database
work-related issues. Sometimes, how- site operations or «interface» use- size in records—for example, 10K,
ever, testing the site from outside the cases, virtual user sessions, and test 100K, 500K, and 1M—and functionali-
firewall may not be appropriate, scenarios. ty performed with and without the use
depending on the throughput capabili- of SSL are elements of the base per-
ties of the firewall, which may not be First, a listing that documents the set of formance tests.
able to pass enough client connections all operations that can be performed on
through at one time to adequately load the site is prepared. This list of opera- • Single-operation load testing extends
the servers. tions can typically be derived from the the base performance tests by adding
set of ASP, PHP, CGI, or other active more users. This type of test is conduct-
• SSL versus Non-SSL. Because the use documents implemented by the site. It ed more to discover component devel-
of SSL carries a high penalty in terms of may not be practical to test all the site opment issues than to simulate site load.
server performance, it is often useful to operations; they must be prioritized in Single-operation load tests should
execute both SSL and non-SSL tests so terms of risk, usage patterns, and other incorporate site operations or «inter-
that the performance versus security criteria, and some will necessarily be face» use cases; incrementing from a
trade-off measures can be quantified. eliminated, owing to time and cost con- low number to a target number of users,
straints. such as 10–200, and equal increments,
• Image retrieval. Depending on the test such as 10, for each run of the load test;
being performed, it may not be desir- Second, virtual user sessions are database size in records, such as 10K,
able to retrieve images from the Web defined and created that tie together a 100K, 500K, and 1M; and functionality
server during performance testing. number of these functions in order to performed with and without the use of
Image retrieval occupies the Web serv- closely simulate a user on the system. SSL.
er’s resources, taking time away from Finally, test scenarios are defined and
processing “active” pages that will created. They provide details of each The number of users should be derived
exercise more important system compo- test type, such as the number of users, from the response time and load
nents. Therefore, tests involving the use the various hardware and site configu- requirements analysis performed prior
of images should be avoided when the rations, and whether the test is per- to the conduct of test planning. As with
Web server is known to be a bottleneck, formed with or without SSL. base performance tests, single-opera-
as that condition will prevent higher tion load tests should be performed on a
loads from being experienced on the The development of test scenarios, the hardware configuration small enough to
back-end tiers, including the application final step in the planning phase, isolate the performance activity, such as
server and database server tiers. involves the various combinations of the site’s base configuration. Any prob-
test types, site and hardware configura- lems uncovered during this testing
Verification Phases tions, database sizes, number of virtual should be corrected prior to performing
Prior to building scripts and executing user sessions, and the numerous param- any subsequent tests.
tests, the Web system and the associat- eters for the execution of the tests. The
ed user base must be analyzed to deter- combinations of these items should pro- • Virtual user load-testing sessions are
mine the typical functions exercised duce enough data from measurements used once the base performance and
during a user session. The types of tests to adequately analyze the site’s behav- single operation load tests have been
to be executed and their configurations ior under load and the effect of various successfully performed and any prob-
are identified during this first test phase. site configurations. Several elements lems have been corrected. The site can
Next, scripts must be created for each are applicable to each type of perform- then be tested for real-world perform-

20 Journal of Software Testing Professionals http://www.testinginstitute.com September/December 2001


ance and scalability using the virtual Web system function should loop sever- of the machine. Typically, performance
user sessions to simulate real users al times on that function, preferably monitoring software can be adjusted to
against the system. with different input data. Most test tools obtain measures at shorter or longer
enable test procedures, or scenarios, to intervals. It is important to properly
• Stress tests are normally performed be configured with a number of options, select a measurement interval that gath-
with a high number of users in an such as the number of users, the amount ers the appropriate information without
attempt to saturate many of the site’s of think time, and the use of image altering the results of a test. It is usual-
servers while monitoring response time retrieval. Using the test plans in the pre- ly best to run the tests over a longer
behavior. This type of testing follows vious section, create all the test scenar- period of time so that the monitor can
virtual user session load testing. Stress ios with the necessary parameters for be configured to take readings with a
test scenarios should be created from various types of tests. longer interval, such as every 10 sec-
the same set of factors as load tests, onds.
with the exception of the number of Test Execution: Once test scripts and
users, which should be set high enough scenarios have been created, it is time to • Warm-Up: It is worthwhile to allow
to cause rejected connections or system execute the tests. Prior to execution, the Web system to operate under simu-
failure. several preparation steps are necessary. lated load, using the testing tool, for
about 20 minutes in order to allow
• Reliability is quite similar to virtual • Server Configurations: Each test sce- caches and buffers to fill up, prior to the
user session load testing, with the nario should be associated with a partic- collection (recording) of measurements
exception of a fixed number of users ular Web system hardware configura- (Microsoft 2000a, p. 12).
and a smaller set of hardware configu- tion description that outlines, for exam-
rations. The goal of reliability testing is ple, the number of Web server proces- Once test preparations have been com-
to exercise the Web site over a long sors and the number of Web servers. pleted, the execution of the tests can
period of time in order to uncover any The site configuration must be verified proceed. Most test tools will record the
defects that occur only after long load and reconfigured when necessary to success or failure outcome of each
or use durations. The number of users support each test scenario. It may also action within the script together with
should be on the high end of the load be necessary to reconfigure certain net- statistics on response times. The per-
requirement that still operates at an work devices when subnetting or other formance data captured during the test
acceptable response time. The hardware network testing applies. is essential for supporting performance
configuration should properly service analysis; therefore, the data should be
the required number of users at that • Fresh Starting Point: Depending on copied to another location immediately
response time. Once the test plans have the test, it may be desirable to restart after each test. It is also important to
been completed, the test procedures, or both the client test machines and the label the data files containing the per-
scenarios, and scripts, which define the Web system servers prior to executing formance measurements with the name
various parameter settings that apply, each test. Doing so ensures that no rem- of the test scenario or scenarios from
including the number of users, think nants, such as component memory which they were produced.
time values, and the use of image leaks, from previous tests will impact
retrieval, can be created. the next test. Common Pitfalls
There are many common performance
Test Script Creation: A test script should • Monitoring: A test tool may include and scalability pitfalls that may be
be created for each site operation. In built-in monitors for tracking server encountered during Web system devel-
addition, virtual user sessions should be activity. When the test tool does not opment and testing. During develop-
created that tie together the site opera- have such a monitoring mechanism, the ment, performance and scalability sur-
tions into a simulated site user session. computer platform’s monitoring tool, prises can be avoided by working with
Automated test tools generally include such as Performance Monitor for system components within the environ-
a script recorder that can be used for Windows NT/2000 environments, ment for which they will most likely
this purpose. Use it to create the ses- should be started and set to record per- operate. Common concerns that should
sions, based on the test planning. It is formance measures from the necessary be addressed as part of development
also important to have the scripts exe- machines into a log file. The operation planning include the following:
cute multiple iterations of the test. For of performance monitoring software on
example, a script that tests a particular a machine will impact the performance

September/December 2001 http://www.testinginstitute.com Journal of Software Testing Professionals 21


• The database should be large. Don’t est, versions of service packs and patch- organization conducting business over
wait until the end of an iteration—or es before testing. To be safe, these items the Web. A Web system that feels slow
time of release—to find out how com- should be the same versions in the may give customers a negative impres-
ponents perform with large amounts of development environment and ultimate- sion of the business and may give them
data. ly in the production environment. cause to seek out a competing system.
This article has examined the essential
• SSL should be enabled and used while • Network bandwidth should be suffi- test phases, including the definition the
developing Web system components. cient to handle all the requests from the test requirements, test planning, script
clients. Only then can a particular load creation, and test execution, which can
• Multiple servers should be developed, level on the server machines be created be used to ensure that the site performs
with at least one physical server for properly. Insufficient network band- and scales appropriately.
each tier, when possible. Don’t assume width may prevent the machines from
that it will work in a distributed config- being properly loaded. Thus, testing References
uration simply because it works collo- over slow wide area network (WAN) Menasce, Daniel A., and Virgilio A. F.
cated on the same machine. links and modems will probably not Almeida. 1998. Capacity Planning for
result in enough load being placed in Web Performance. Upper Saddle River,
• HTTP error codes must be confirmed the servers. In addition, ensure that NJ: Prentice-Hall.
to return from the site whenever any other systems and people are not using
problems occur. The system’s failure to the network during a load test. Microsoft. 1999b. “Building High-
return error codes may fool a test tool or Performance testing requires a network Scalability Server Farms.” Microsoft
script into thinking that the test com- with as much free bandwidth as possi- Site Server Resource Kit. September.
pleted successfully. ble. Therefore, remove other traffic
from the network, or, possibly, place all Microsoft. 2000a. “Capacity Planning-
• Third-party products, such as a direc- the test hardware on a separate subnet. Duwamish Online Sample E-
tory server, reporting server, or payment Commerce Site.”
system, should be incorporated into the • Logging functionality needs to be dis-
Web system architecture only after a abled or compiled out, if applicable, Rational Software Corporation. 1999.
prototype component has been load before test execution. Failure to do so “The Rational Approach to Automated
tested against this server, in order to can result in wildly inaccurate per- Testing.” http://www.rational.com/
verify whether it will function properly formance data. products/whitepapers/100581.jsp.
under required user load and system
stress levels. Common concerns for the • Release builds, not debug builds, of About the Author
testing phase, which should be application components must be veri- Elfriede Dustin is a SQA Certified Test
addressed as part of test planning and fied as installed on the server. A debug Engineer and has supported test efforts
execution, include the following: build, a non-optimized version of a for a multitude of applications. She is
binary executable file, is typically pro- frequently a speaker at various Quality
• Unnecessary processes—services and duced and used during development Assurance and Software Test
programs—should be shut down on all phases and may also contain debug- Conferences. Elfriede has a BS degree
client and server machines. This will ging information. Debug builds are in Computer Systems Analyst/program-
allow for more of the system’s useful during development but result in mer developing software applications
resources, such as CPU, memory, and slower component performance. The and utilities, process and data modeling
I/O, to be allocated to support the oper- release build, which is used within the using CASE tools, and system design
ation of tests on the client and process- production environment, is typically simulation models.
ing the requests on the server. constructed with all the compiler’s
optimization features turned on, in
• Service packs and patches typically order to produce smaller, faster-run-
include performance and stability ning code. S
enhancements but also bugs and per-
formance degradations. Make sure that Ensuring that the Web system is able
clients and servers are properly config- to service its customers in a timely
ured with the proper, not necessarily lat- fashion is critical to the survival of an

22 Journal of Software Testing Professionals http://www.testinginstitute.com September/December 2001

You might also like