15 jmeter distributed performance test

Background
Due to the bottleneck of jmeter itself, when thousands of concurrent users need to be simulated, it is not enough to use a single machine to simulate all the concurrent users, and even cause a Java memory overflow error. To solve this problem, you can use distributed testing, run multiple machines and use the so-called Agent to share the pressure of jmeter itself, and use this to obtain a larger number of concurrent users, but some related modifications are required.
To sum up, jmeter is developed by java and consumes memory and cpu, so it still needs to be distributed under large concurrency.

Test Step
1. Turn off the firewall.
2. Install jmeter on the machine where you want to run jmeter as a load generator, and determine one of the machines as the Controller and the other as the Agent. Then run the jmeter-server.bat file on all Agent machines. Suppose we use two machines 192.168.0.11 and 192.168.0.12 as Agent (JDK must be installed on the Agent machine and environment variables must be set).
3. In the %JMeter_home%/bin directory on the Controller machine, edit "remote_hosts=127.0.0.1" in jmeter.properties. 127.0.0.1 represents the machine running the jmeter Agent, which needs to be modified to "remote_hosts=192.168.0.11:1099,192.168.0.12:1099", where 1099 is the port number.
4. Start jmeter.bat on the controller machine, and select 192.168.0.11:1099 or 192.168.0.12:1099 in "Remote Start" in the menu Run to run the Agent respectively. If you want to execute both, you can click "Remote All Start" under the Run menu.
5. Sometimes the machines used as agents are too few and still can not meet the needs, you need to use the computer as the Controller as the Agent, you also need to modify the jmeter.properties file and write the IP of the Controller. At the same time, at this time, you need to open jmeter-server.bat in the %JMeter_home%/bin directory of the Controller computer first, and then open jmeter.bat. At this point, enter the "Remote Start" menu under Run, and you can see that the Controller is also running as a remote machine.

FAQ
1. Make sure that the jdk version installed on the controller machine is the same as jmeter.
2. When the Agent machine starts jmeter-server.bat, the background prompts: "Could not find ApacheJmete_core.jar".
Solution: This is that ApacheJmete_core.jar was not found at the beginning. If you don't want to see the words Could not find, you need to add the environment variable JMETER_HOME, and the path is the upper-level directory of the bin directory, so that when the jmeter-server service is started, it will not be See "Could not find ApacheJmete_core.jar".
3. During the distributed control process of jmeter, the number of threads started by each Agent is equal to the configuration in the thread group.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325900547&siteId=291194637