When using Jmeter performance test interface, since Jmeter JAVA application is for CPU memory consumption is relatively large, so that, when tens of thousands of concurrent users of the need to simulate, using a single machine to simulate all concurrent users will be some powerless, JAVA also cause memory overflow error, in order to allow Jmeter tool provides greater load capacity, then you can use a distributed function Jmeter provided by more than stress tests start the computer.
Distributed principle Jmeter
- When Jmeter distributed execution, select one of them as a control unit (the Controller), other machines as the agent (- Agent);
- When executed, Controller will send the script to the Agent, to get started after the Agent script, no need to open Jmeter Agent execution when, just open Jmeter-server.bat
- Agent will result back to the Controller, Controller Agent will collect all the information and summary;
A control unit (Controller) Configuration:
- Controller need to install the JDK, Jmeter, and configure the environment variables;
- See local IP
ipconfig
example: 192.168.10.180; - Open Jmeter / bin / jmeter.properties, find
remote_hosts=127.0.0.1
, modify this line isemote_hosts=192.168.8.1789:1099,192.168.10.180
; if more than one proxy machine, where the agent needs to put all of the IP address and port number are joined . - After configuration start jmeter-server.bat, but it will complain, prompted to encrypt, and this time double-click
create-rmi-keystore.bat
and then fill in the same information as prompted to go, yes or no direct experience filled Y, then Enter ok, then generatermi_keystore.jks
copy to each Agent'sbin
directory; - The Controller then execute jmeter-server.bat
The agent (Agent) Configuration
- Agent need to install the JDK, Jmeter, (version to be consistent with the Controller) and configure the environment variables;
- See local IP
ipconfig
example: 192.168.10.178; - Open Jmeter / bin / jmeter.properties, find
remote_hosts=127.0.0.1
, modify this line isemote_hosts=192.168.8.178:1099
; - Click jmeter-server.bat setting is finished, waiting for machine control (Controller) start;
Test Results
Opens Jmeter add a request (remember to add a polymerization report for easy viewing test results), the number of threads is set to n, then click on the navigation bar runs ---- all remote start, etc. After the polymerization finished viewing the report Samples
if it is the number of threads twice it means success it!