Jmeter distributed deployment test

Source: Internet
Author: User

When jmeter is used for performance testing, a large number of concurrent jobs may not be supported due to configuration restrictions on a single computer. Therefore, the distributed test function provided by jmeter is required.

The execution principle of the jmeter distributed test is to select one as the scheduling machine, and other machines as the Execution Machine. During execution, the scheduling machine sends the script to each execution machine, and the Execution Machine starts execution after obtaining the script, the execution machine does not need to start the GUI during execution, but uses the command line execution mode. After the execution is completed, the execution opportunity returns the execution result to the scheduling machine. The scheduling machine collects all the information returned by the Execution Machine and generates a test report.

The specific deployment steps are as follows:

1. Execute machine deployment

1) install jmeter on the executor

Note: The jmeter and JDK versions should be the same as those of the scheduling machine. Otherwise, some strange problems may occur.

2) Add environment variables. Varies depending on the system configuration (Windows/Linux)

3) Start the executor. (For Windows: in the bin directory, enter the jmeter-server.bat; for Linux: in the bin directory, enter jmeter-server)

------ Jmeter uses port 1099 by default. If you need to change it to another port, you can modify it in the jmeter. properties file, server_port and server, RMI. localport.

2. Scheduling machine configuration

1) modify the remote host address and IP address in the jmeter. properties file.

Remote_hosts = IP1: port1, ip2: port2

Note: The jmeter default port (1099) is modified on the Executor. When modifying the remote host address, you must configure the corresponding port number. If the port number is not modified, use the default value, you do not need to set ports (for example, remote_hosts = IP1 and ip2 ).

2) Start remote

You can use GUI mode or command line mode at startup.

(1) The GUI mode is as follows:

 

It can be divided into: Remote Start and remote all start. In remote start, you can select any configured execute machine. If you select remote all start, it will be on all the execution machines you have configured, to start running.

(2) The command line mode is as follows:

In command line mode, add:

-R: IP address (IP address) of the remote host. If multiple IP addresses exist, use-r 192.168.2.170 and 192.168.2.171 (distributed)

-R: identifies all remote executions. (Distributed usage)

For example:

Jmeter. Bat-n-t E: \ apache-jmeter-all \ te. JMX-r 192.168.2.170-l e: \ apache-jmeter-all \ testlog \ test050701.jtl

Problem: when using distributed deployment, there may be no response information displayed in the result tree of the controller. Modify the jmeter. properties file.

 

 

Jmeter distributed deployment test

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.