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.
- Click on Write Post link
- Write Post (140 characters)
- Submit Post
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 X 3 = 4500
|2||Click on Write Post link||3|
|3||Write Post (140 characters)||120|
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.
Let me summarize the steps to design workload model.
- Analyze the application
- Identify the metrics such as transactions, concurrent users etc.
- Design the load distribution
- 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!
- How to performance test AngularJS or ReactJS applications? - June 25, 2017
- How to run Apache JMeter tests with Visual Studio Team Services? - June 6, 2017
- Google Test Automation Conference – GTAC 2017 - June 2, 2017
- What’s new in StormRunner 2.5? - June 1, 2017
- Must have Apache JMeter Plugins - May 19, 2017