Chapter 8: Distributed Testing of Jmeter

one:

Due to the bottleneck of Jmeter itself, when simulating thousands of users concurrently, using a single machine will be somewhat incapable, and even cause Java memory overflow errors. To solve this problem, we must use distributed testing, run many machine, that is, the so-called Agent to share the pressure of Jmeter itself, and use this to obtain a larger number of concurrent users,

Therefore, we need to make relevant modifications and configurations:

 

1. Install Jmeter, and set one of the machines as the controller machine, and the other machines as the Agent machine, and then run the jmeter-server.bat files of all the Agent machines. If two Agent machines are used now: 172.19.1.94, the other The station is: 172.19.1.10, (all Agent machines must have jdk installed)

2. Edit under the bin directory of the controller machine: the jmeter.properties file, and change the remote_hosts here to the IP of your Agent; if the controller also performs concurrent testing, just add the corresponding IP directly. Now; the 1099 here is the port number, it may not be 1099, you can set it yourself;

3. Then save,

4. Then start the jmeter.bat file of the controller machine, and then

Here you can see the corresponding Agent machine;

5. Then run all of them;

6. Sometimes there are few proxy machines, and the controller machine is also used as a proxy machine for testing. At this time, you need to add the IP address of the controller machine to the file you just modified; then restart it according to the above steps. ; Every time we need to start: jmeter-server.bat, and then start the jmeter.bat file;

two:

The pits I stepped on when I used it:

The agent machine does not need to configure anything. After Apache4.0, the distributed key needs to be created: double-click: create-rmi-keystore.bat, follow the prompts to create the key - then a key file will be generated: rmi_keystore.jks; then This key file is copied to each agent machine and placed under the corresponding bin directory, and then the controller machine can control the corresponding agent machine;

When jmeter is remote, you need to open the service, jmeter.server.bat,

When jmeter.bat opens
to report a Java error, add: environment variable;

It is best that the version of jmeter is the same as that of Java;

1. An error will appear after jmeter-server.bat is started on the Agent machine: can not find ApacheJmeter_core.jar;

Solution:

At the beginning of this matter, I didn't find the corresponding: ApacheJmeter_core.jar; or if we don't want to see the words: can not find, we need to add an environment variable, and the variable is the upper-level directory of bin, so that we won't see the words can not find. ;

2. In the jmeter distribution test, the number of threads of all agents is equal to the configuration of the thread group in the controller machine;

 

Guess you like

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