How Many Load Generators Do We Need For Performance Testing
By Sam Z // Sunday, August 31, 2014
It's one of the regular questions that will be asked as to how many load generators do we need in Loadrunner or any other tool. It depends upon the testing tool that we use and the configuration of our system (Example: CPU, Memory, Operating System etc.). Without knowing the exact load generators sometimes the performance testing results may vary. For example, if we need four load generators instead we ran the test with only two load generators and the load generator machines will get slower and the permance testing results may vary. Recently I have gone through an article where the HP Loadrunner team beautifully explained about how many load generators do we need for our test. We need to follow these steps to calculate how many load generators do we need.
First, we need to record the script and enhance the script to work with multiple users and iterations.
Once the script is ready, upload the script to controller and run the script with one user using a few minutes delay before the start of the script and observe any increase in RAM when the vuser starts. This is the First Vuser memory.
Now run the test with five users and with five iterations and execute the test. Keep the same starting delay and add next vuser with one minute delay and observe how much increase in ram for every vuser and do average for the last four vusers RAM and do not count the first vuser RAM usage.
Now we need to find how much Total RAM we have in our machine and give 750 MB to 1000 MB for system resources.
Find what is the 75 percent of remaining RAM after allocating RAM for system resources. For example, if the system has 4 GB of RAM, and 1 GB for system resources and in 3GB find what is the 75 percent of RAM, which will be 2250 MB, Here I have calculated 1GB equals to 1000MB.
Now subtract the first vuser memory.
Divide with average of the last 4 Virtual vusers.
and at last add the +1 (This is the one vuser first we have subtracted).
Load Generators Calculation Formula
Hope it helps, and Please note it just a reference it may not work for some of the protocols like Citrix, RDP, any protocol with the term GUI in it, and QTP\UFT scripts. Do you know: From Loadrunner 12 we have Load generator calculator. Check in your loadrunner 12 installation. Reference: http://h30499.www3.hp.com/t5/HP-LoadRunner-and-Performance/The-Protocol-Complexity-Matrix-and-what-it-means-for-your-load/ba-p/6559424