Performance Testing E-Commerce Web Systems Presentation Paper
Performance Testing E-Commerce Web Systems Presentation Paper
Performance Testing E-Commerce Web Systems Presentation Paper
Presentation Paper
Mike Hagen
The Vanguard Group
5/3/2000
By performance testing your Web systems before they are elevated to production,
you will know in advance what needs to be beefed up for the “big day”. At Vanguard,
our biggest day happened over the Y2K weekend when many of our clients logged in to
check on their life savings. This presentation will go through how we prepared for this
event and how you can do the same.
There are two ways to predict how your systems will hold up under a lot of load,
Performance Testing and Modeling. Modeling uses software to simulate entire systems
and allows you to do ‘what if’ scenarios without having the actual resources. Modeling is
an extremely valuable tool that can, and should, be used in conjunction with performance
testing. Performance testing runs actual applications on physical systems with
monitoring devices in place to report on how the system is performing. The tests should
be executed on ‘production like‘ systems that have controlled software. Setting up this
testing environment will be the first thing you have to do.
Hardware
How do you justify spending a million dollars on a testing environment? You
gather up all of the articles from the last holiday season, when most of the E-commerce
sites failed to handle the onslaught of shoppers, and plop them on the procurement
manager’s desk. If you work for a company that thinks like most other companies, you
have to use dollar signs. If you just try to use common engineering sense, you will fail.
The ideal test environment would be an exact replica of the production
environment. Undoubtedly you will not be able to spend all of the money that you want
and you will have to find ways of stretching your budget. One way to save some cash is
to build a scaled down version of production. Meaning if you have 20 web servers in
production, buy 5 for testing purposes and extrapolate the results. The hardware has to
be the same, but you do not need to have as many. The best way to go about determining
how to scale your system is to look at how your load is balanced in production. For
Next you will need to put in the request for more hardware to be used as your
physical load generators. The physical generators are the boxes where the simulated Web
user traffic will be spawned. I will go into these simulations later. You will need enough
processing power and network bandwidth to support the amount of traffic that would
normally be coming from you ISPs. A regular PC probably cannot support this kind of
traffic. You will need a bank of PCs or maybe one good sized Unix box. Plus the
network connection from these load generators to the Web systems needs to be sized
properly. A 10 Mbit Ethernet connection is probably going to get maxed out. If you
have a T3 connection to your ISP in production you could get ~45 Mbits of traffic.
Therefore, your test network will have to support at least that and hopefully more in case
you want to do capacity planning tests for more ISP connections.
Software
Configuration management is so important in testing efforts. Hopefully you will
have a team dedicated to this. But if you do not, you will have to ensure that the versions
of software that you are testing are what will be going into production or are already in
production. Take the time to make a list of every piece of software in your system
(operating systems, communication software, web server versions, etc.). Make the same
list of the production systems and make sure everything that differs is either changed or
slated to change once you go to production.
This also holds true for system configuration files. Settings like logging levels
and server timeouts can really invalidate your test results if they are not configured like
they will be in production. Ideally, the config files used during test should be directly
copied into production with only a few changes to some global variables. If you can do
this, you are probably in good shape.
Let us look at the load generators first. Depending on the type of testing (stress,
load, endurance), you will have to choose a load template that represents the functionality
and level of use to be executed on your Web system. A load test of the entire baseline of
software is one of the more involved tests and will require a lot of different scripts to be
run at the same time. The load generators will be sending and receiving requests at very
high rates. They will also be reporting on the most important performance measurement
in Web systems, end user response times. WebLoad has a Central Console that controls
the running of the test.
If you have a Mainframe in the loop, there are a number of ways to get transaction
information. Omegamon seems to be a fairly universal tool. It allows you to drill down
to individual transactions and find CPU usage, amount of I/O, and response times.
Mainframes store lots of historical data. You just need to figure out how to get to it.
Network monitoring will let you know if your routers, firewalls or switches are
causing bottlenecks. Many network sniffers are available and can be turned on and off
quite easily. Do not let your telecom group tell you that there is plenty of bandwidth.
Web sites generate an enormous amount of data. During peak moments, the network
cannot be re-transmitting or dropping packets. Things will snowball quickly.
The last form of monitoring that I will mention is application log monitoring. If
your code is not already instrumented with calls to an application log, put in the request
now to have it done. If a CGI script has to make a database request, it is extremely
helpful if you have a log of the round time for the request. If this kind of info is there,
you can just tail the logs during the test to see how things are going. There is a
programming standard called ARM (Application Response Measurement) that details the
APIs for applications to log what they are doing or waiting for. This is wonderful. Tools
like Tivoli’s TAPM, use the ARM API and gives incredible insight into what your
applications are doing. The instrumentation is usually designed with the ability to turn it
off with a global application variable. That way, all of the excess logging does not occur
when you do not need it and additional resources are then made available. Weather you
Network Firewalls
It is the first thing that the user traffic hits. If it cannot handle the load, you are
not going to be able to find any other problems down the line. Internal company
firewalls usually have a lot more rules and a lot less CPU power than a production Web
system firewall. The more rules that each connection has to pass the more CPU it will
require. Use the same rules and the same hardware as production.
Test Data
Test data includes information like user account preferences, product information,
and passwords. If this data changes without you knowing, your test scripts could fail. If
possible, limit the access to this data to a bare minimum. Sharing a username and
password database with another group WILL result in them accessing and modifying user
information to the extent that it messes up your tests. It is inevitable. So lock this info
down.
Unmonitored Resources
Everything is suspect. If you do not monitor it you could spend months chasing a
problem that could have been caught by simply logging into a box and tailing a log file.
Monitor everything!
Database Requests
Request for data can severely slow down the building of a Web page. We have
found that making 1 big request versus many little requests reduces the overall request
Slide19 – Questions