Differences between process runs and thread runs in LoadRunner

Source: Internet
Author: User

Differences between process runs and thread runs in LoadRunner

Time: 2012-5-23-10:29 Author: Tian Zhilao Source: 51Testing Software test Network editing

Font: Small medium size | Previous post Next | Print | I want to contribute | Recommended Tags: performance test software testing LoadRunner loadrunner test tools

  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 line 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, one user per row, The system will need 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 will be a few more threads in each process, such as 53, the more processes may be used to maintain the running between processes) Select thread mode Although you can reduce the number of mmdrv processes that start up, reduce the memory footprint, but also prone to a problem, for example, the same Test The scenario, with the thread concurrency will be a time-out failure or error, and the process concurrency is correct. Why is it? 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 be freed with resources, and B threads are waiting for other resources to be released to 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 is selected to run the virtual user about the process: whether it is a single-line or multi-row 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; A few lines (<50 people per line) start several processes instead of starting a process per user. If you choose the thread mode, the number of processes to start, and further with the script is a single row or more lines about the single-line script, 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, need to start a process, Multiple lines need to start a process more than one, and not every user starts a process, and a few rows (<50 people per row) require several processes to be started. After IP spoofing has been initiated, the number of processes required to start, as well as the selection of IP addresses by process or by thread, about per-process IP: Each IP (load generator) needs to start a process more; per-thread IP: Each IP (load generator) does not need to start a process more.

That is, in the Vugen in the Run-time Miscellaneous can be set in order to illustrate the start of each vuser, the process or the thread.

Single-and multi-line scripts are not single-script and multi-script meaning, one-script and multi-script is you record good one script after the save (if called Test1), and then record a script (called Test2), you can set in the controller, You can run the Test1 script (single script) or Text1 and Text2 simultaneously (multiple scripts),
The controller can set their running order, conditions and so on;

Run-time-setting (F4), you can execute only one of the scripts by setting run Logic.

Differences between process runs and thread runs in LoadRunner

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.