By default, (Dedicated web hosting) the Storefront application uses a debug
By default, the Storefront application uses a debug implementation and doesn’t connect to a database. This was done so you didn’t have to have a database installed just to run the example application. There’s no real point in going through the entire exercise of testing the Storefront application; the numbers wouldn’t mean anything anyway. It would, however, be helpful to show how to get started and what steps must usually be taken to get performance numbers out of an application. The following are the general steps: 1. Understand the performance goals. 2. Establish the performance baselines for the application. 3. Run tests to collect performance data. 4. Analyze the data to detect where the problems are. 5. Make the necessary software and hardware changes to increase performance. 6. Repeat Steps 3 through 5 as necessary to reach the performance goals. This section works through each of these steps. For this exercise, we are going to use a scaled-down version of the Mercury Interactive LoadRunner product, called Astra LoadTest. This is a feature-rich commercial product. A demo version that will support up to 10 virtual users is available for download at http://www-svca.mercuryinteractive.com/products/downloads.html. 17.4.1 Understand the Performance Goals Before you begin testing, it’s important to understand the performance goals of the application. The performance goals are normally specified in the nonfunctional requirements for an application, using the following units: Average transaction response time Transactions per second (tps) Hits per second It’s not absolutely critical that you know what the performance numbers need to be before starting to test the application, but it can help to have a set of expectations. Sooner or later, someone is going to ask you how the application performs. To be able to say “it’s good” or “it stinks,” you’ll need to evaluate its performance relative to some set of goals. 17.4.2 Establish a Performance Baseline Once you’re ready to start testing, the first thing you should do is establish a baseline. A baseline is a snapshot of your application’s performance before anything has been done to it. It’s always a good idea to get a performance baseline before you start changing code to improve the performance. Otherwise, how do you know whether you’ve made it better or worse? 17.4.2.1 Taking a baseline Most performance-testing tools allow you to record the interaction sequence between a browser and the web application. Although most tools also allow you to manually create the testing scripts, using the tools’ automatic recording aspects is very convenient. Figure 17-1 illustrates the recording screen of the Astra LoadTest software.
You want to have a cheap webhost for your apache application, then check apache web hosting services.