Close

October 22, 2012

Calculating Virtual Users (VUsers) for Load/Stress Testing

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

                          = 500

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.

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.

4 Comments on “Calculating Virtual Users (VUsers) for Load/Stress Testing

Sajid
October 24, 2012 at 5:33 am

Hi Naveen,
Thanks for highlighting an interesting testing topic in a detailed, very simple, structured and useful manner. As we are calculating No. of virtual users for our load test but when we do performance testing, we never tested the application against any specific user set; we always perform different user tests to determine the system state at different loads. Now my question is,
How to use these virtual users’ calculations in our performance test?

Secondly, I am working in an independent software testing company and have executed few performance testing projects. The culture here is, client provide us the URL and ask to do the performance testing without providing any information (due to limited technical knowledge). So in that case we use incremental approach to test the application by increasing the virtual users test by test. Please suggest me,
What will be the best strategy for virtual users’ calculation in this case?

Reply
NaveenKumar N
October 26, 2012 at 12:19 pm

Sajid,

You need to get atleast any two info such as N, Z or R. Just get the info from developers. They must be able to get relevant info. Performance Testing without any objective, is of no use.
If you don’ have any thing, my suggestion is just try to perform stress testing to identify the breaking point.

Thank you!
http://QAInsights.com

Reply
Tester
November 8, 2014 at 4:16 pm

Naveen,

As per jmeter diff. fields which are equal to Z , R and T? I mean can we get these all 3 times by running test in jmeter?

Reply
kirankumar
March 15, 2016 at 3:09 pm

Hi,

The little explains how to get the vusers for the load test with the formula
but to TPS, Response time and think time on which bases we are getting this metrics

What I mean to ask is that We have to do a baseline test with one user one iteration to get the TPS, Think Time and Response which will give us the no of Vusers?

Please let me know

Kind Regards
kirankumar

Reply

Leave a Reply to NaveenKumar N Cancel reply

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