Wednesday, August 31, 2011

What is the difference in running Vusers as processes versus threads? What are the advantages of one versus the other? Is it possible to change this setting?

More thread Vusers can run on a machine
When running the Vuser as a process, LoadRunner will create 1 process per Vuser. So if you have 50
Vusers, you will have 50 mdrv.exe processes on your machine
When running the Vuser as a thread, LoadRunner will create 1 thread per Vuser. So if you have 50
Vusers, then you will have 1 process with 50 threads running inside it if the limit is 50 threads per
process.
Prior to LoadRunner7.6:
The default is 50 vusers per thread. This has proven to give the best performance with stability.
If you run into stability issues, it might pay to lower the number of threads per process to 10, and
see if that helps. You can modify this from the Controller -> Tools -> Expert Mode -> Tools ->
Options -> Agent -> Max Threads for Driver
LoadRunner7.6 and above:
The option for modifying "Max thread per driver" is no longer available in the Controller's UI.
Thread per driver is now fine tuned for each protocol and user is not recommended to change
this setting.
To start a process or thread on a system, there will be several modules being loaded on to the memory.
For a process:
program counter - identifying next instruction to execute.
processors register set - contains register values.
text segment - contains code section.
data segment - contains variable content.
stack segment - contains temporary data such as subroutine parameters, return addresses, temporary
variables.
For a thread:
The text segment and the data segment are being shared by multiple threads within 1 process. Each
thread will have its own allocation for the rest of the module.
That is why you will be able to run more Vusers as threads than as processes since less memory
resources are being taken. By default, most of LoadRunner Vuser's is set to run as a threads unless
they are not thread safe . There is, however, a trade off on running vuser as a thread. The more
threads in a process, the more unstable the system.

No comments:

Post a Comment