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.
- Must Have Tools For Technical Founders - November 9, 2017
- Brotli Compression in Performance Testing - October 6, 2017
- Unboxing HPE StormRunner 2.7 - September 27, 2017
- What’s new in Apache JMeter 3.3? - September 25, 2017
- Measuring Client-side performance using Performance APIs - September 19, 2017