How to design Workload Model for Load Testing?

In this blog post, we will see how to design workload model for Load testing. If you not aware about what load and stress testing is and the differences between load and stress testing, please visit my previous blog post Types of Performance Testing and Differences between Load Testing and Stress Testing. Designing workload model is a critical and mandatory activity, before you perform load/stress testing.

What is workload model?

Distribution of load across the identified transactions in a given time is called Workload. Workload helps us to study the behavior of the system under various identified workload model.

Workload model can be designed by predictability, repeatability and scalability. E.g. consider a website which provides online seasonal greeting cards. During festival seasons, the number of visitors will be high, whereas during non-seasonal time, visitors will be minimal. By predicting the number of visitors, one can design workload model accordingly.

While designing workload model for banks or financial sector application, once should consider repeatability as well as scalability too.

Before designing workload model, it is important to collect relevant data which helps us to create effective workload model. Following items are required, in order to design effective workload model.

  • Number of concurrent users
  • Total Transactions to be achieved
  • Scenario and its Actions
  • % of total user for an action

Consider a web application which publishes your post across social medias; total number of concurrent during peak business hours (from 11:00 to 13:00) per day is 1500. Following are the list of transactions performed by the users.

  1. Login
  2. Click on Write Post link
  3. Write Post (140 characters)
  4. Submit Post
  5. Logout

Our objective is to design workload model to perform load testing. From the available data, I have arrived workload model as shown below.

S.No Scenario Actions Transactions in seconds Concurrent Users Transactions to be achieved % of total user
1 Submit Post Scenario with 3 iterations with 900 seconds ramp-up period Login 5

1500

 1500 X 3 = 4500

100

2 Click on Write Post link 3
3 Write Post (140 characters) 120
4 Submit Post 3
5 Logout 3

Above table has a scenario Submit Post with 3 iterations along with 15 minutes of ramp up period, hence the transaction to be achieved will be 4500. There is 100% load distribution across all the actions. Now next step is to prepare the graph for load testing.

Preparing workload model graph

Usually load testing will be done at least for an hour with 15 minutes of ramp-up and ramp-down period, and the steady state period will be for 1 hour. Below is the pictorial representation of workload model.

How to design workload model for load testing

Let me summarize the steps to design workload model.

  1. Analyze the application
  2. Identify the metrics such as transactions, concurrent users etc.
  3. Design the load distribution
  4. Design the workload graph

Important note: it is not advisable to have steady state during the initial phase; because sudden load to the server may clog the server resources and leads to internal failure. Continuing the load test with such failures gives invalid data for analysis.

In next blog post, we will see about designing workload model for stress testing. Please let me know if you have any questions in comments section. Thanks!

Once a week we send a digest with the most popular articles.

About NaveenKumar Namachivayam

Hi there! is a passionate and experienced Performance Test Analyst based in Chicago, IL, USA with the skill sets in Manual Testing, Test Automation, Performance Testing, and Web Services. He loves to learn and experiment new trends and models in Software Testing. Please stop by at his personal blogs: NaveenKumarN.in, PerfTractor and Giftt

10 Comments

Add a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.