How to calculate number of users/load generator?

N.S. Madhu Sudhan Gupta, Technical Manager.

As part of performance environment set up,  one decision that constantly needs made as part of environment set up is , How many load generators are required.

 

One should understand the importance of performance environment setup not just a point and run, but it involves getting the budget approval, setting up the firewall, getting the required software installed if any, allocation of vusers, updating of test data files etc….and at any point of time if shortfall of a load generator machine then, one need to go through all the above mentioned process may be during the critical phase of application delivery. Hence it’s really important calculate No. of LG(s) required.

Since most of the applications are moving towards cloud, there is a significant cost involved for spinning up of every new machine/instance in cloud and it’s always wise to for a methodical approach ,to calculate number of users/load generator, you must first identify a single Vuser footprint as follows:

Below steps are for load runner, same can be applied for JMeter as well:

  • Create a scenario in the Controller which uses your script, and set the number of iterations to 30 in the Run Time Setting. It should be configured to run until complete.
  • Using the Windows Resource Monitor, configure %Process Time and Private Bytes counters on the mdrv.exe process in order to measure the footprint. Note that in order to configure these counters, you should first run the script to have an mdrv.exe running. Run the scenario just for the sake of configuring the counters and then stop and save it before initiating the real test.
  • Run the scenario and make sure the monitor data is collected
  • As soon as the scenario execution ends, analyze the results using the Analysis tool. Make sure you analyze complete data and not only summary data.
  • Open the Windows Resource graph and make a note of the average CPU and peak memory utilization.

Now, you can determine the number of Vusers per LG. You need to work out how many Vusers the CPU can sustain, and how many the memory can accommodate.

  • This formula will give you the number of Vusers the CPU can sustain:

Number of Vusers per CPU = (70% * Number of Core Processors)/ Vuser Average CPU Usage

(We recommend limiting it to 70% so as not to overuse the CPU)

  • This formula gives you the number of Vusers the memory can accommodate:

Number of Vusers by Memory = (Total GB RAM of LG – GB RAM allocated for the operating system and other processes) / Vuser Peak Memory Usage

(You might want to reserve 1GB for the OS etc)

The number of Vusers that you are looking for should be the lower of these two values.

Here’s a table with some examples:

Leave a Reply

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

*