Frequently I will be getting this question to my mailbox, forums and even in calls. How to calculate number of virtual users (VUsers) for load/stress testing? What should be the concurrent virtual users to load? What should be the peak load?
25, 100, 500, 1000. We cannot give number of VUsers blindly which will not return intuitive result for analysis.
The main purpose of VUsers is to simulate the live environment. It is very tricky but easy to obtain number of VUsers required for the load/stress testing. Universal formula to calculate the arriving rate to the system is Little’s Law.
N = Z * (R + T)
where N – number of VUsers,
Z – Transactions per Second (TPS)
R – Response Time in seconds
T – Think Time in seconds
If you get the following data from the stakeholders i.e. TPS, Response Time and Think Time, number of VUsers can be calculated easily.
E.g. TPS is 100, R is 3 sec and T is 2 sec then N will be
N = 100 * (3+2)
= 100 * 5
Peak load will be 500 VUsers.
Suppose if there is no data available on TPS and Response Time, and you aware any one of the following combinations, you can use this online calculator.
- Peak Hourly Visits and Average Visit Length
- Peak Hourly Pages, Testcase Size and Duration
It is vital important to simulate the input data in load/stress testing. This online calculator provides how many data you would need for simulation.
- Rajini Makkal Mandram Vs Makkal Neethi Maiyam – a tech comparison - March 5, 2018
- Do not blame it on server! - February 26, 2018
- Unboxing Apache JMeter 4.0 - February 13, 2018
- Swagger Inspector and Swagger Hub Hands-on - January 25, 2018
- Speedometer 2.0 Testing - January 17, 2018