Load testing with LoadRunner in heavy loads ()

Source: Internet
Author: User

Using LoadRunner for load testing in large loads requires configuring some environment to meet the full range of resources under heavy load:

1. In order to avoid the occurrence of "No Buffer Space Available "Error, the following configuration is required:

1) Modify the registration form:

* Set "Hkey_local_machine\system\currentcontrolset\services\tcpip\par
Ameters\tcptimedwaitdelay "for 30
* Set "Hkey_local_machine\system\currentcontrolset\services\tcpip\par
Ameters\maxuserport "for 65534
* In the HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session
Manager\sub systems\windows "set SharedSection to 4096

2) Set the "SHUTDOWN" mode to "abrupt" by adding the following function at the beginning of each script

Web_set_sockets_option ("Shutdown_mode", "abrupt")

2. Turn off all antivirus, anti-spyware scanning software and so on. It also shuts down the task scan and all unwanted services.

3. Script Runtime settings:

1) Set log to "send message only when error occurs"

2) option to produce snapshot when error is removed

3) on Miscellaneous, remove the option to define each step as a transaction

4) do not choose to simulate browser cache, select "Simulate new user on each iteration" and its sub-options

4. If the downloaded page has no resources, add "mode=http" to the Web_url function, which reduces the load on LG (not converted to HTML). By default, the mode of Web_url is mode=html

5. Restart LG and make sure that they are connected to the controller.

6. Make sure that there is enough free disk space on the LG and Controller.

7. Remove the Web page breakdown from the Controller

8. Limit the number of simultaneous initialization of VUser on all LG. You can modify it in the controller's Tools > Options > Run-time settings. Each LG has this setting.

9. Limit the number of errors that the controller stores at run time. By modifying the [output] entry in Wlrun.ini:

Flaglimitoutputmessages=1
maxnumberofoutputmessages=<errors count> (default is 10,000)

10. Modify the Monitor's sample rate on the controller to reduce CPU usage. You can modify it under Controlller Tools > Options > Monitors, as shown in:



11. If there are many errors, it is best not to open the Error/output window frequently, as this will open additional database connections because of access to the database.

12. Do not use the "Show vuser" option in the load test.

13. Redirect the output information to a text file instead of outputting it to an MDB file. You can modify the Wlrun7.ini under [output] in the

Exportmessagetofile=1 to achieve.

14. Do not run virtual users on the controller machine.

15. Set up the monitor in the scene:

* Memory usage on the private bytes of the mmdrv process

* Disk Use

* CPU Usage

* Network usage

16. Remove the script with the printed information. The following code is called once per iteration, negatively impacting the operation of a large number of concurrent users.

Lr_vuser_status_message ("Piteration:%s-
START Action ", lr_eval_string (" {piteration} "));
Lr_output_message ("Piteration:%s-start Action", lr_eval_string ("{piteration}"));

The controller handles all virtual user information, which greatly reduces the performance of the controller. The following is a similar code:

Web_reg_find ("Text=time on Server", "Savecount=cerr",..);
Web_url (some url ...);
if (Atoi (lr_eval_string ("{cerr}")) >0) {
Lr_error_message (some message);
Lr_end_transaction ("S05_t01_request_content_page", Lr_fail);
}

It is generally considered bad to insert a lr_error_message in a script, except that it is necessary to insert the statement if the calling client API fails. If the LoadRunner function call fails (as in the Web_url call above), it automatically sends an error message.

In the case of a large number of users running, it is very important to control the traffic between the controller and LG. Sending extra information (errors, output, and so on) can increase traffic to reduce the load capacity. Therefore, it is often necessary to remove unnecessary information from the code.

17. Remove all calls to sleep () from the script, replacing it with Lr_think_time (). Lr_think_time gives LR control, that is, LR can do other useful things when vuser sleeps.

18. Do not remove Lr_think_time: Use this function to more accurately simulate the load, to create a relatively small pressure on LG

19.web_reg_save_param and Web_reg_find () functions:

• Add the "notfound=empty" parameter in Web_reg_save_param ().
• Add "Savecount=some_parameter_name" to Web_reg_find (). If you want to know if it is successful you can use Atoi (lr_eval_string ("{some_paramater_name}") to measure it.

20. Other

Problems that may occur:

* The test produced too many errors:

Error engine cannot handle more than 1.5GB of errors

If more than 1000 errors are generated per second during the test, the controller's behavior is unpredictable

* Testing generates a lot of online data

The above two problems can be solved using the following methods:

Example: A scene is a group with 1000 virtual users

You can divide this group into two groups:

G1 vusers
G2 vusers

These two groups can generate the same load as the original group, and for G2 add the following parameters to the group command line:

-disable_data-disable_messages

_disable_data: Let this group not send any information, do not send any online information, do not write any offline information.

_disable_message: Let this group not send any information to controller (error, log)

Note: Using the command-line option above will cause the LG to not send online and offline information to Congtroller. So the analysis data of the virtual users on this group is not collected.

21. Mercury only supports PC anywhere if remote access is required.

Translated from <loadrunner Large Load Test considerations>

Load test with LoadRunner in a heavy load ()

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.