The LoadRunner controller will run the VUser using the driver mmdrv. The user can select the mode of operation of VUser in the controller's Run-time setting, which is multi-process mode or multithreading mode.
If you choose to run the virtual user in a threaded fashion:
When the scene is set, "is a single-line or multi-line script" Determines how many processes the system starts:
Assuming that the concurrent user is set to 30, if it is a single row of 30 users, the system only needs to start a process;
Assuming that the concurrent user is set to 30, if it is multiple rows, 30 rows, and one user per row, the system needs to start 30 processes;
If you choose to run the virtual user in a process way:
So no matter how the script set in the scene group, is a single-line multi-user or multi-line users, the system needs to start the number of processes is certain, is the total number of concurrent users;
Advantages and disadvantages of process mode and threading method:
If you choose to run as a process, each user starts a mmdrv process, and multiple mmdrv processes consume a lot of memory and other system resources, which limits the number of concurrent users that can run on either load generator because the load machine's resources (memory and other system resources) are limited.
If you choose to run as a thread, by default, the controller starts only one MMDRV process per 50 users, and each user runs on a thread-by-thread basis, which saves a lot of memory space by sharing the memory segments of the parent process. This allows more users to run on a single load generator. (If you choose a thread to run the user, there are several more threads in each process, such as 53, which may be used to maintain the running between processes)
Select thread mode Although can reduce the number of mmdrv processes started, reduce the memory footprint, but also prone to a problem, for example, the same test scenario, with a thread concurrency will have a timeout failure or error, and the process concurrency is correct. Why? Because a thread's resources are allocated from a process resource, multiple threads in the same process have shared memory space, assuming that a thread needs to wait for the B thread to release with the resource, and the B thread waits for other resources to be released before it can continue, and this problem occurs.
The number of MMDRV processes that the system needs to start is related to which factors:
As in the run-time settings of the controller, the process mode or thread mode is selected to run the virtual user.
Process mode: Whether it is a single line or multi-line script, the number of processes that need to be started is the number of concurrent users;
Threading: Suppose it's a single-line script that starts a process for every 50 users, multiple lines of script, and a few lines (<50 people per line) start several processes instead of starting a process per user.
If threading is selected, the number of processes to start is further related to whether the script is single-row or multiple-line
Single-line scripting, multi-user, assuming less than 50, just start a process, 100 users, just start 2 processes, and so on;
Multiple lines of script, even if one user per row, also need to start a process, more than one row will need to start a process, not every user starts a process, a few lines (each line <50 people) need to start several processes.
The number of processes that are required to start after IP spoofing has been started, as well as the choice of whether to assign IP addresses by process or by thread
By process IP: Each IP (load generator) needs to start a process more;
IP by thread: Each IP (load generator) does not require more than one process to start.
Performance test Tool LoadRunner process run and thread run differences