First of all LG and Controller are physical machine on which we installed LG software.
To check LG s/w in installed:
Go to command prompt--> Type Services.msc-->Check Performance center Agent Service--> If its status is started then LG s/w is installed.
In LG machine,in the right bottom corner you can see one small red tower icon and if you take mouse over that it will show Performance center Agent Service.
In controller you are not able to see small red tower icon but you can see "Performance center Agent Service" in the services.msc.
How to check version of LG on a machine
Go to control panel--> Add remove Program--> Check the version of HP performance center Host with SP1/Patch1
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.
Another method:
Another view:
The mdrv.exe is a driver process which is responsible for running Vusers on your load generator. Even after LR11.xx, this process continues to be 32 bit one. So the maximum addressable space is 4GB by this process.
Running VUsers as thread has an advantage of sharing this 4 GB of space between a lot of threads. With the increase in number of users, you can see the instances of mdrv.exe increasing on your load generator to accommodate the users.
To check LG s/w in installed:
Go to command prompt--> Type Services.msc-->Check Performance center Agent Service--> If its status is started then LG s/w is installed.
In LG machine,in the right bottom corner you can see one small red tower icon and if you take mouse over that it will show Performance center Agent Service.
In controller you are not able to see small red tower icon but you can see "Performance center Agent Service" in the services.msc.
How to check version of LG on a machine
Go to control panel--> Add remove Program--> Check the version of HP performance center Host with SP1/Patch1
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.
Another method:
Firstly,
identify a single Vuser footprint as follows:
- 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 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:
No of Core Processors
|
Average CPU usage of Vuser (%)
|
Vusers for CPU
(70%*No of Core Processors)/Average CPU usage of Vuser
|
Total Assignable Memory (GB)
(Total Memory-1GB)
|
Peak Memory per Vuser (MB)
|
Vusers for Memory
(Total Assignable Memory/Peak memory per Vuser)
|
Lower of “Vusers per CPU” and “Vusers by Memory”
|
8
|
10
|
(70*8)/10=56
|
8-1=7
|
80
|
7GB/80MB=89
|
56
|
4
|
22
|
(70*4)/22=12
|
8-1=7
|
100
|
7GB/100MB=70
|
12
|
8
|
6
|
70*8/6=93
|
16-1=15
|
120
|
15GB/120MB=125
|
93
|
It’s
not bulletproof – different scripts have different considerations and requirements,
so it’s difficult to say categorically that this will work. But it should be
enough to get you started.
Another view:
The mdrv.exe is a driver process which is responsible for running Vusers on your load generator. Even after LR11.xx, this process continues to be 32 bit one. So the maximum addressable space is 4GB by this process.
Running VUsers as thread has an advantage of sharing this 4 GB of space between a lot of threads. With the increase in number of users, you can see the instances of mdrv.exe increasing on your load generator to accommodate the users.
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:
To verify the number of processes launch, you can check the number of mdrv.exe processes using the task manager. |
No comments:
Post a Comment