Close

October 31, 2012

How to design Workload Model for Load Testing?

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!

About NaveenKumar Namachivayam

Hi there! is a passionate and experienced Performance Test Analyst based in Chicago, USA with skill sets in Manual Testing, Test Automation, Performance Testing, and Test Estimation. He loves to learn and experiment new trends and models in Software Testing. Please stop by at his personal blogs: Excel Blog, DealsBrook, NaveenKumarN.in, and Affiliate Insights blog and Software Testing Memes.

10 Comments on “How to design Workload Model for Load Testing?

Pratim
October 14, 2013 at 10:11 pm

Hi Naveen,

Thanks for explaining an interesting topic of performance testing in a very simple yet beautiful fashion. I was looking for some stuffs on ‘how to design workload model’ but got very disappointed from the available stuffs on internet. At last your blog page gave some good insight.
I have 1 query here. As you mentioned in the above table :
1. Submit Post Scenario with 3 iterations with 900 seconds ramp-up period
2. Transactions in second e.g. Login 5 etc.

Now how did you get these info? Who would give us this TPS/ no of iterations or it is our responsibility to calculate these?
Waiting for your reply on this.
Have a nice time ahead!

Thanks,
Pratim

Reply
NaveenKumar N
October 28, 2013 at 9:50 pm

Thanks Pratim! Please refer slide #8 in this presentation. I have listed how to start performance testing project. Please check this.

Reply
Shweta
October 23, 2015 at 8:22 pm

GUd Information

Reply
Sampath kumar M
February 5, 2016 at 8:10 pm

Hi Naveen,

I am really willing to know the answers for the above to understand this in more details

Reply
NaveenKumar N
February 7, 2016 at 7:32 pm

Please email me your questions 🙂

Reply
srikanth
May 25, 2016 at 5:15 pm

Hi Naveen,
I would like to know about the challenges we face in scripting for webhttphtml

Reply
Madhusudhanan
November 27, 2016 at 9:30 pm

Hi Naveen,

Thanks for your post…I still have some doubts regarding workload model designing and would like to email you..please provide your email ID

Reply
Kumar
March 23, 2017 at 1:42 pm

Hi Naveen,

Please provide your E mail ID.

Thanks,
Kumar

Reply
NaveenKumar Namachivayam
April 3, 2017 at 10:10 am

Please ping me in http://www.fb.com/QAInsights. I will reply you immediately. Thanks!

Reply
Sivakumar
May 25, 2017 at 1:41 pm

Hi I need one help

I have one script that contain a,b,c,d,x,y,z these are actions. I give 10 iterations.even no vusers should run only even no no actions,odd no virtual users should run only odd no iterations.

Waiting for it response.

Thanks&regards
sivakumarch572@gmail.com

Reply

Leave a Reply

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