Jmeter distributed stress test

 

 

Distributed testing in JMeter

As a pure JAVA GUI application, JMeter's consumption of CPU and memory is still amazing, so when it is necessary to simulate thousands of concurrent users, using a single machine to simulate all concurrent users is somewhat incapable, and even causes JAVA memory overflow error. However, JMeter can also share the pressure of the load generator itself by using multiple machines to run so-called proxies like LoadRunner, and use this to obtain a larger number of concurrent users, we only need to configure it manually.

1. Install JMeter on all the machines expected to run JMeter as a load generator, and identify one of the machines as the controller and the others as agents. Then run the JMeter-server.bat file on all proxy machines - assuming we use two machines 172.20.80.47 and 172.20.80.68 as proxies;

2. Find the bin directory in the JMeter installation directory of the Controller machine, then find the jmeter.properties file, and open it with Notepad or other text editing tools;

3. Look for the string "remote_hosts=" in the opened file, you can find the line "remote_hosts=127.0.0.1". Among them, 127.0..0.1 represents the machine running the JMeter agent, which needs to be modified to "remote_hosts=172.20.80.47, 172.20.80.68";

4. Save the file and restart JMeter on the controller machine, and go to the Start->Remote Start menu item. You will see the addresses of the two agents we just added, select them to run, and if you want to start all agents at the same time, select Remote Start All. To perform distributed testing, you need to add environment variables on the agent machine, that is, add the user variable JMETER_HOME=d:\jmeter, and add d:\jmeter\bin to the path in the system variable (assuming that jmeter is placed in the root directory of the d disk).

Distributed testing in JMeter

As a pure JAVA GUI application, JMeter's consumption of CPU and memory is still amazing, so when it is necessary to simulate thousands of concurrent users, using a single machine to simulate all concurrent users is somewhat incapable, and even causes JAVA memory overflow error. However, JMeter can also share the pressure of the load generator itself by using multiple machines to run so-called proxies like LoadRunner, and use this to obtain a larger number of concurrent users, we only need to configure it manually.

1. Install JMeter on all the machines expected to run JMeter as a load generator, and identify one of the machines as the controller and the others as agents. Then run the JMeter-server.bat file on all proxy machines - assuming we use two machines 172.20.80.47 and 172.20.80.68 as proxies;

2. Find the bin directory in the JMeter installation directory of the Controller machine, then find the jmeter.properties file, and open it with Notepad or other text editing tools;

3. Look for the string "remote_hosts=" in the opened file, you can find the line "remote_hosts=127.0.0.1". Among them, 127.0..0.1 represents the machine running the JMeter agent, which needs to be modified to "remote_hosts=172.20.80.47, 172.20.80.68";

4. Save the file and restart JMeter on the controller machine, and go to the Start->Remote Start menu item. You will see the addresses of the two agents we just added, select them to run, and if you want to start all agents at the same time, select Remote Start All. To perform distributed testing, you need to add environment variables on the agent machine, that is, add the user variable JMETER_HOME=d:\jmeter, and add d:\jmeter\bin to the path in the system variable (assuming that jmeter is placed in the root directory of the d disk).

Guess you like

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