Distributed performance Testing with JMeter

Source: Internet
Author: User

The eldest brother confessed a small task of interface performance test, originally he proposed to use LR, but I am so big volume of gadgets really don't see, so daoteng up JMeter.

The specific task content is not much said, the basic requirements are 1200 concurrent. But we found that JMeter run 800 threads around the top not up, basically run a will be stuck. Baidu (not to use Baidu for shame), seemingly can use jmeter distributed testing to achieve the purpose, it is called the distributed architecture, in fact, there is a master or controller, control the rest of the machine run, that is, the so-called agent or slave to share JMeter its own pressure, thereby expanding its performance, to obtain a larger number of concurrent users, only need to do some configuration, as well as polymorphic running JMeter physical machine can be configured as follows:

1. First, run JMeter as the Load Generator on all devices in the environment, identify one of the devices as the Controller, and other devices as agents, it is important to ensure that all JMeter versions are consistent. Then run the%jmeter_home%/bin/jmeter-server.bat file on all agent devices--This assumes the use of two devices 192.168.0.1 and 192.168.0.2 as agents, 192.168.0.100 is a controller (a local area network is usually a subnet).

2. Locate the Jmeter.properties file in the%jmeter_home%/bin/directory of the controller device and open it and look for the string "remote_hosts=", and we'll see a line like "remote_hosts= 127.0.0.1 ", this is the default remote agent device IP. This needs to be modified to "remote_hosts=192.168.0.1:1099,192.168.0.2:1099", where 1099 is the default RMI port number for communication between the Controller and the Agent for JMeter.

3. Save the above file and restart the Jmeter.bat on the Controller machine to open JMeter, open the Run-and Remote Start menu item, you can already see the remote boot menu under 192.168.0.1, 192.168.0.1 two IP addresses.

4, if you want to allow an agent to execute, click on the corresponding IP address can be started, if you want to run all agents, you can click the Run menu under the "Remote Run All" menu.

At this point we have a problem, such as we ask for performance is concurrency number 1200, then we have two agents (Controller device is not to participate in the generation of concurrency data), then we write performance test script, the concurrency number is written as 600, Then copy the script to each agent device? or write a script with a concurrency of 1200, run it on the controller, and the controller will automatically assign the performance pressure? or write a concurrency number of 600 run on the controller side, the same configuration issued to each agent? Practice proves to be the last case, that is, each agent is running the same concurrency number, the sum is our performance requirements, but do not need to manually copy the script

Find data Some blog posts say that sometimes the agent machine is too small, you need to use the controller device as an agent to meet performance requirements, that is, a device needs to concurrently controller and agent. This situation I have not practiced, theoretically should also be possible, the communication to do a loopback on it. Here's how to use the notes:

The jmeter.properties file needs to be modified to write the controller's IP address. Then, you need to open the Controller%jmeter_home%/bin directory under the Jmeter-server.bat, and then open Jmeter.bat, at this time, enter the run-and Remote Start menu, You can see that the controller is also running as a remote machine.


Reference: http://jmeter.apache.org/usermanual/remote-test.html

This article is from the "Morganchen Code farming Notes" blog, please be sure to keep this source http://chenmg.blog.51cto.com/3039876/1730456

Distributed performance Testing with JMeter

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.