Planning a Load Test

 

Step 1: Identify System Configuration

 

Identify and set up the system configuration in which your web application should run to measure the performance statistics. For example, run your web application in two machines, PIII 1 GHz 512 MB RAM and PIV 2 GHz 2 GB RAM. This will help you to compare the two system configurations and identify which one performs better and meets the expected performance criteria in which you can host your web application.

 

Step 2: Identify Key User Scenarios

 

Identify the key user scenarios or user transactions that a real-world user would perform and that are critical for your web application from a performance perspective. User scenarios include multiple application activities. Key user scenarios are identified based on specific performance goals such as transactions that consume time or those that have a significant impact on your application's performance. One such user scenario is determining the approximate time required to process a user transaction and returning the results. For example, processing the credit card details and returning the status takes approximately 5 seconds, etc. Some of the key user scenarios are as follows:

Step 3: Identify Load

For each user scenario, identify the following:
  1. Number of users - The total number of users accessing your web application over a given time frame.
  2. Percentage of users - Identify the percentage of users accessing parts of your web application or the users to be associated with each user scenario such as 60% of users browsing the home page, 20% of users purchasing items from the shopping cart and the other 20% of users searching for required items, etc.

Step 4: Identify Metrics

 

Identify the relevant metrics that you need to collect in your load test. This will help you easily analyze the potential bottlenecks in your web application in relation to your performance objectives. Metrics collected can include CPU usage, memory usage, hits per second, server response time, page download time, error percentage, etc.

Following are the performance metrics that can be monitored:

System-specific metrics:
This set of metrics helps you to measure the resource utilization in your web server. The system resources such as total % of CPU usage and memory usage of the configured system can be measured.
Web application-specific metrics:
This set of  metrics helps you to measure the server response time (time between Request sent to time of receiving First Byte), page download time, page response time, errors in web pages, throughput (which measures the data transferred relative to some unit of time), etc. You can also measure the overall application throughput, hits per second, response time, page download time and time taken to complete each transaction.
Database-specific metrics:
This set of metrics helps you to measure the database issues. Metrics collected for MySQL include thread details, connection details, query details, table-related statistics, etc.

 

Once you identify the above, create the load test and run the test for multiple iterations, analyze the results, use the results to improve both the subsequent testing and/or tune the system resources or your web application being tested, and run the load test again.



Copyright © 1999, AdventNet Inc. All Rights Reserved.