What is the difference between a process and a thread?

Process is defined as the virtual address space and the control information necessary for the execution of a program while Threads are a way for a program to split itself into two or more simultaneously running tasks. In general, a thread is contained inside a process and different threads in the same process share some resources while different processes do not.

In terms of Loadrunner:

Running as Process:

- When we run Vuser as a process, LoadRunner creates 1 process called mmdrv.exe per Vuser.
So if we have 10 Vusers, we will have 10 mmdrv.exe processes on our machines.
- If you run each Vuser as a process, then the same driver program (such as mdrv.exe or r3vuser.exe) is launched (and loaded) into the memory again and again for every instance of the Vuser.
- Loading the same driver program into memory uses up large amounts of RAM (random access memory) and other system resources. This limits the numbers of Vusers that can be run on any load generator.
-Disables MultiThreading

Running as Thread:

- When we run Vuser as a thread, LoadRunner creates 1 thread per Vuser. So if we have 10 Vusers, then we will have 1 process with 10 threads running inside it if the limit is 10 threads per process.
-If you run each Vuser as a thread, the Controller launches only one instance of the driver program (such as mdrv.exe), for every 50 Vusers (by default).
-This driver process/program launches several Vusers, each Vuser running as a thread. These threaded Vusers share segments of the memory of the parent driver process. This eliminates the need for multiple re-loading of the driver program/process saves much memory space, thereby enabling more Vusers to be run on a single load generator
-Enables MultiThreading

Running Vuser as a thread is more memory efficient that running Vuser as a process for obvious reasons that less memory resources are utilized when we run them as thread.

The following protocols should not be run as threads:Sybase-Ctlib, Sybase-Dblib, Informix, Tuxedo, and PeopleSoft-Tuxedo

Comments

Post a Comment

Popular posts from this blog

How to use a value between two different threads in Jmeter

Steps to Analyze AWR Report in Oracle

Correlation and checking in Results