Return to PerformanceTestingGuidance


**! How To: Model the Workload for Web Applications**

Applies To

* Web Applications

Summary

This how to shows you how to model the workload for Web Application. For modeling workload you have to identify the performance critical user paths for the Web application. Gather all the relevant details like think time etc for each user path. Identify the work distribution ratio for various user paths. Identify the overall user load and load distribution per user path.

Contents

* Objectives
* Overview
* Summary of Steps
* Step 1 – Identify user paths
* Step 2 – Identify details of the user paths
* Step 3 – Identify the distribution / ratio of the work
* Step 4 – Identify the user load levels
* Step 5 – Identify range of scenarios for normal and peak load.

Objectives

* Learn how to model workload for web application

Overview

Workload modeling is the process of identifying one or more workload profiles to be used in performance testing of a web application. Each workload profile represents a variation of the following attributes:
* Key users paths.
* Distribution / ratio of work
* Number of concurrent users.
* Patterns of workload.

Identifying proper workload profiles is the crux of performance testing, as it helps to identify key bottlenecks, capacity for each workload profile for a given Web application.

Summary of Steps

Step 1. Identify user paths
Step 2. Identify details of the user paths
Step 3. Identify the distribution/ratio of the work
Step 4. Identify the user load levels
Step 5. Identify range of scenarios for normal and peak load

Step 1. Identify user paths

User paths generally incorporate multiple application activities aimed to achieve some end result. Identify user paths within your web application that has significant performance impact or has explicit performance goals. The user paths are either commonly executed or are resource intensive.
For example user path for placing an order includes following activities
* Log on to the Application
* Browse a product catalog
* Search for s specific product
* Add items to shopping cart
* Validate credit card details and place an order.

You should prepare list of all such user paths (scenarios) and prioritize them from performance perspective. For example here is the list of user paths for typical commerce application.
* Browse
* Search
* Place order

Step 2. Identify details of the user paths

Identify the details for each user path identified in Step. 1., like think time, which is time spent by user between two activity requests. During this time user views the information displayed on the page or enter any required user inputs on the page.

Break down each step or request of each user path, starting with the first step.
Track the steps to the business process.

What about getting more information about each of the transactions? Information from IIS Log files, or interviews with end-users or business analysts? How about analyzing each user path for key integration points with other systems? Are there any external data sources or remote calls in this user path? Are there any special measurements required – like not just throughput, but a count of data received from a sub-component?

Step 3. Identify the distribution/ratio of the work

For each of user path identified in step 1, identify the distribution / ratio of the work. The distribution is based on the number users accessing a particular user path. For example browsing a product catalog is more common scenario then placing an order scenario.

For an existing web application this information can be provided from IIS log. For a new web site this information can based on marketing data.

For the example, the distribution of work various user paths could be similar to that shown in the following Table
Work Distribution
User Scenarios% of Work distribution
Browse50
Search30
Place Order20
Total100

Step 4. Identify the user load levels

Identify the maximum expected concurrent users for the web application. This information can be obtained using following methods.
* For an existing web site it can be obtained from IIS log, which is take total # of concurrent sessions.
* For a new website the total # of concurrent users can be based on market analysis.
Using this information and the work distribution for each user path calculate the work distribution and user load for each user path. This is the basis of arriving at a workload profile.

For the example, the distribution of load for various profiles could be similar to that shown in the following Table.

Load Distribution
User Scenarios% of usersUsers
Browse50250
Search30150
Place Order20100
Total100500

Step 5. Identify range of scenarios for normal and peak load

* Identify the ratio / work distribution for the identified user paths at peak hours when the user load level is at its maximum.
* Identify the ratio / work distribution for the identified user paths at normal (for example 9-5) hours when there is Steady user load level.
* Identify the ratio / work distribution for the identified user paths at special events, like sale etc.

For the example, the distribution of load at peak hours for various profiles could be similar to that shown in the following Table.

Load Distribution at peak hours
User Scenarios% of usersUsers
Browse50500
Search30300
Place Order20200
Total1001000

The distribution of load at normal hours for various profiles could be similar to that shown in the following Table.

Load Distribution at normal hours
User Scenarios% of users*Users*
Browse50250
Search30150
Place Order20100
Total100500

Additional Resources

<<To be Done>>
Microsoft Communities