As a pure Java Of Gui Application, Jmeter For CPU And memory consumption is still amazing, so when you need to simulate thousands of concurrent users, using a single machine to simulate all the concurrent users is not enough, or even cause Java Memory overflow error. However, Jmeter It can also be like LoadRunner By running the so-called Agent To share Load Generator To obtain a larger number of concurrent users. According Jmeter The signature of the official document. You need to complete this configuration by yourself, but don't worry, it will be very simple. Pai_^
1. Run in all expected Jmeter As Load Generator On the machine Jmeter And determine one of the machines Controller , Other machines Agent . Then run all Agent On the machine JMeter-server.bat File -- assume we use two machines 192.168.0.1 And 192.168.0.2 As Agent ;
2. In Controller Machine Jmeter Find Bin Directory, and then find Jmeter. Properties Use notepad or other text editing tools to open this file;
3. Find" Remote_hosts = "This string, you can find such a line" Remote_hosts = 127.0.0.1 ". The 127. 0. 0.1 Indicates running Jmeter agent Here, you need to change it to" Remote_hosts = 192.168.0.1: 1664,192.168 .0.2: 1664 "-- 1664 Is Jmeter Of Controller And Agent By default RMI Port number;
4. Save the file, and restart controller jmeter. bat , go to Run-> remote start menu item. What did you see? ^ _ ^