JMeter actual performance testing, performance testing of distributed

By remotely run JMeter, you can copy across multiple low-end computer tests to simulate a greater load on the server. One example of JMeter client may control any number of remote JMeter example, all the data collected therefrom.


Save the test sample to the local machine

From one machine to manage multiple JMeter Service

No need to copy the program to test each server - client sends it to the server for testing all jmete

Note: All servers are running the same test plan. JMeter will not distribute the load among servers, each running a complete test plan. Therefore, if you set 1000 and has 6 threads JMeter server, it will eventually inject 6,000 threads.


Distributed Test There are some fundamental limitations. 

No proxy server, RMI can not communicate via the subnet; therefore JMeter can not use a proxy. 

Starting with version 2.9, JMeter test results will be stripped of all response data to the console, thus reducing the impact on network IO. Make sure that you monitor your network traffic, so as not to cause traffic contention. 

Running a single JMeter client on the 2-3 GHz CPU (latest CPU) can handle 1000-2000 threads, but also depend on the specific type of test: http, ftp.


Distribution test schematic: 





Configuration node

Ensure that all nodes (clients and servers): 

1, JMeter is running the exact same version. 

2, using the same version of Java on all systems. Use different versions of Java may work, but not encouraged. 

3, has a valid RMI over SSL key store, or disable the SSL.


Setting up SSL

Since JMeter 4.0, the default transport mechanism RMI will use SSL. SSL keys and certificates needed to work. Do not use the ssl security vulnerability.


Windows system (called bin / create-rmi-keystore.bat) 

Unix systems (referred to as bin / create-rmi-keystore.sh). 

Executing the script production key, which is valid for seven days, the default password is 'changeit' 

Such as setting time:


$ cd jmeter/bin

$ ./create-rmi-keystore.sh

What is your first and last name?

  [Unknown]:  rmi

What is the name of your organizational unit?

  [Unknown]:  My unit name

What is the name of your organization?

  [Unknown]:  My organisation name

What is the name of your City or Locality?

  [Unknown]:  Your City

What is the name of your State or Province?

  [Unknown]:  Your State

What is the two-letter country code for this unit?

  [Unknown]:  XY

Is CN=rmi, OU=My unit name, O=My organisation name, L=Your City, ST=Your State, C=XY correct?

  [no]:  yes


Copy the generated rmi_keystore.jks to jmeter/bin folder or reference it in property 'server.rmi.ssl.keystore.file'

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

Then copy the generated rmi_keystore.jks to the bin directory and then set in the jmeter.propertis


server.rmi.ssl.keystore.file = generated rmi_keystore.jks // references the SSL key


To be distributed test all jmeter service machines goes through the project configuration. After generating a key jmeter replicated to the other clients, servers corresponding configuration.


JMeter / RMI needs to connect to the server from the client end. It will use the port you choose, the default value is 1099. 

JMeter / RMI also need to reverse connection to the server of the sample results returned to the client. 

This uses high-numbered ports. 

This port may be controlled by a property called jmeter.properties client.rmi.localport in the JMeter. 

If there are any firewalls or other network filters JMeter between clients and servers, it is necessary to ensure that they allow the connection. If necessary, use monitoring software to display the traffic is generated.


Step 1: Start the server


To run the JMeter remote node by running JMETER_HOME bin / jmeter-server (unix) or JMETER_HOME / bin / jmeter-server.bat (windows) script to start the JMeter server component on all machines you want to run /.


Please note that, unless a different RMI ports, or only have a JMeter server on each node.


JMeter 2.3.1 From the start, JMeter server application initiates its own RMI registry; there is no need to start RMI registry alone. To revert to previous behavior, define JMeter property


server.rmi.create = FALSE 

On the server host system. 

By default, RMI uses dynamic ports for the JMeter server engine. This can cause problems with the firewall, so you can define the JMeter property server.rmi.localport to control this port number. If this is not zero, it will be used as a server engine of the local port number.


Step 2: Add the server to the client IP "Properties Files"


JMeter edit the properties file on the machine control. In JMETER_HOME / bin / jmeter.properties, find the property called "remote_hosts" and add value JMeter server IP addresses are running. A plurality of such servers may be added, separated by commas.


Note that you can use the -R command line option to specify the remote host to use. This use -r and -Jremote_hosts = {serverlist} has the same effect. E.g


jmeter -Rhost1,127.0.0.1,host2 

If you define the JMeter property server.exitaftertest = true, then the server will exit after running a single test. 

You can also start the test client remote command attribute -X will exit after running a single test.


Step 3a: Start JMeter GUI client from the client to check the configuration


You are now ready to start JMeter client control. For MS-Windows, use the script "bin / jmeter.bat" to start the client. For UNIX, use the script "bin / jmeter". You will notice the Run menu includes two new sub-menus: "Remote Start" and "Remote Stop" (see Figure 1). The menu contains the client that you set in the properties file. Use remote start and stop, rather than ordinary JMeter start and stop menu items.


Step 3b: Start from a non-GUI JMeter client


GUI mode can only be used for debugging, as a better choice, you should be from a non-GUI (command line) to start the test client on a remote server. The command to do this is:



Guess you like

Origin blog.51cto.com/14529380/2435614