There are several factors that can affect the scalability of a script, and so the number of Vusers that can be run, it is not always possible to determine the hardware requirements to run a given number of vusers. The best approach is to run some tests to verify empirically the resource requirements of the specific scripts being used during a test.
Factors that can impact the number of vusers which can run on a load generator are:
- Length of the business process or in other words script length
- Complexity of the script e.g. custom code, correlation etc
- Number of scripts needs to be executed in the test scenario
- Protocol used to script the business flow in Vugen
- Run time setting used “Run vuser as process” or “Run vusers as thread”. It’s recommended to use Run vuser as a thread option (default one) unless your application under test (AUT) is not thread safe
- Level of the logs selected under Run time settings during test execution
- Load generator machine is physical or virtual
- Hardware configurations of the load generator machine. The primary factors affecting the script execution are Memory and CPU Utilization. Other factors such as Network Bandwidth and Hard Disk speed can become factors but in virtually all cases the core issue will be Memory and CPU related.
In order to determine the number of users that will run on a given Load Generator machine it is best to run some tests from the LoadRunner Controller. Create a scenario using the scripts in question where they are run on a remote Load Generator using a slow ramp up of vusers. During this process monitor that Load Generator to see what Memory and CPU resources are used as the load is increased. Note that in this case the "load" that we are talking about is the client side processing load on the Load Generator machine itself and not the load on the Server (which is what is normally measured during an actual load test.)
Using this method an accurate estimation may be made about how many vusers can be run on that machine. Also some extrapolation may be done to determine additional hardware requirements for additional vusers. It is also wise to monitor the Load Generator machines during the actual test to ensure they are not a bottleneck in the test (as that would invalidate the test results anyway.)
Some rules of thumb for monitoring load would be:
- CPU usage should stay below ~80-90% continuous usage.
- Memory usage should stay within the physical limits of the machines memory. This means that the "Commit Charge Total" should be less than the "Physical Memory Total" which will ensures that minimal paging is done to simulate physical memory.
No comments:
Post a Comment