Tuesday, July 30, 2013

How much load we can generate from a LG

Web vusers are hosted by a process called mmdrv.exe (check task manager when running a test, you will see it there). There is one copy of the process for each 50 vusers so a 200 user test will have 4x that process.

Each process uses about 7MB + about 350KB for each vuser (changes slightly according to version of LR, OS, size of script, logging level, recording options, day of week, whether it is raining etc)

So a 200 user test would be (4x7MB) + (200x350KB) = about 98MB, more or less. Scale up for your own requirements.

Other protocols use more memory (e.g. TruClient uses about 20MB per vuser I think)

Generally, don't go above about 70% CPU or memory usage on the load generator (monitor the LG as part of a test-the-test-system test to make sure). So work out how much free memory you have on your machine, take 70% of that value, then calculate as above.

How many Java Virtual Machines (JVMs) does LoadRunner use? If the user runs 20 Java Vusers, will that use 20 JVMs or just one JVM?

Solution


JVMs are loaded per-process.If you are running the Vusers as a process, then there will be one JVM for each Vuser. If they are running as threads, there will be as many Vusers to a JVM as there are threads to the process.

Example: To run 20 Vusers in Controller:

If you are running 10 threads per process, there will be 2 mdrv.exe processes launch, and hence 2 JVMs.
If you are running 5 threads per process, there will be 4 mdrv.exe processes launch, and hence 4 JVMs.Additional Information:
To verify the number of processes launch, you can check the number of mdrv.exe processes using the task manager.

1 comment:

Sentie said...

Nice articel, thanks.

Question:
How do you assign the number of threads to a process and what runtime-setting do I need to set for it?