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.
Hi there! NaveenKumar N 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