Jmeter---distributed testing

Source: Internet
Author: User

When using JMeter for performance testing, if the concurrency is large (for example, the most recent project needs to support 1000 concurrency), the configuration of a single computer (CPU and memory) may not be supported, and the functionality of distributed testing provided by JMeter can be used.

First, JMeter distributed execution principle:

1, JMeter distributed testing, choose one of them as a scheduling machine (master), other machines as actuators (slave).

2, when executed, master will send the script to each slave, slave get the script to start execution, slave execution without the need to start the GUI, I understand that it should be executed through the command line mode.

3, after the completion of the implementation, slave will return the results to Master,master will collect all slave information and aggregated.

Second, the Executive machine (slave) configuration:

  1, slave machine need to install JMeter, how to install the details here is not described in detail.

2. Add environment variable: jmeter_home=d:\b_tools\apache-jmeter-2.13, here is your JMETER path

3, start the bin directory: Jmeter-server.bat, start success such as:

  

4, superscript red IP and port will be used in the master configuration. IP is slave machine IP, port default is 1099, port can also be customized, here I custom 1000, this later will speak.

5, multiple sets of slave words, repeat the 1~4 step is good.

Third, the Dispatch machine (Master) configuration:

  1, script: A simple access to Baidu's script:

  

  2, find JMeter Bin directory jmeter.properties file, modify the following configuration, IP and port is the IP of the slave machine and the custom port (here I custom 100, the following will explain how to customize):

remote_hosts=10.13.223.202:1000,10.13.225.12:1000

    Multiple slave before with "," separated, I configured 2 units, you can see the red this is the above slave IP and port.

  3, open JMeter, select Run, there is the start of the operation, the operation of all start two options:

  

  4. Select Remote Boot-->10.13.225.12:1000

A) master results, here I only started 10.13.225.12:1000 this one slave, so there is only one result (both the number of threads and the number of cycles is 1):

  

b) Slave console information:

5. Select Remote boot--all remote start:

A) master results, all started, I configured 2 slave, so there are two execution results:

  

  

Iv. Custom Ports:

  The above has actually implemented the JMeter distributed test, this section mainly describes how to customize the slave port:

1, slave: in the slave machine JMeter bin directory, find the Jmeter.properties file, modify the following two configuration items, such as I change here to 1888:

server_port=1888

server.rmi.localport=1888

  2, start the Jmeter-server.bat on the slave machine, for example, the port has been modified to: 1888

  

  3, Master: Modify the Master machine's Jmeter.properties file:

remote_hosts=10.13.223.202:1000,10.13.225.12:1888

4. Restart the Jmeter.bat, for example, the port has changed:

  

V. Other NOTES:

1, the Dispatch machine (master) and the Execution Machine (slave) best separate, because master needs to send the message to slave and will receive slave back test data, so mater itself will have consumption, so it is recommended to use a machine alone as Mater.

2, parameter file: If using CSV to parameterize, then need to copy the parameter file on each slave and the path needs to be set to the same.

3, each machine installed on the JMeter version and plug-ins are best consistent, otherwise there will be some unexpected problems.

Jmeter---Distributed testing

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.