N.S. Madhu Sudhan Gupta, Technical Manager.
As part of the performance environment set up, one decision that constantly needs to be made is to decide “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 needs to go through all the above mentioned processes during the critical phase of application delivery. Hence it’s really important to calculate no. of load generators required.
Since most of the applications are moving towards the cloud, there is a significant cost involved for spinning up every new machine/instance in the cloud and it’s always wise to have a methodical approach. To calculate the 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 the 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 load generator (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: