JMeter - How to perform Distributed Load Testing?

As JMeter has some limitations for generating requests from one single machine we go for distributed testing to overcome this. In distributed testing we configure one Master machine and slave machines (and the no of slaves depends upon the load/users) to simulate load with more numbers of users. As the master machine controls the test and slaves will do the actual job.

distributed-load

Let's consider 4 machines which are setup on cloud with 8GB RAM configuration. One will be termed as Master and other 3 will act as slave machines. Now, steps to be done before starting the distributed testing through GUI:

  • Ensure that the 'system firewall' is turned off in all.
  • Download latest and same version of Apache JMeter along with the supported version of Java.
  • Now open the jmeter.properties file of the master machine, and add remote_hosts=192.168.10.01,54.153.130.212,54.215.185.156 (IPs of slave machines) under Remote hosts and RMI configuration.
    remote-host-and-rmi-configuration
  • Though there is no need to start RMI registry separately, but if you want to run the JMeter on specific port, you can define in jmeter. properties with following command: - server.rmi.localport=4000 (define the port)
  • Now open jmeter-server.bat file in all the slave machines.
    jmeter-server-bat-file
  • In master machine, just open JMeter (jmeter.bat) in GUI and select the test plan which you want to run and click Run in the we can see 'Remote Start' (or) 'Remote Start All' (we can see the IP of three slaves which we given in jmeter.properties file).
    remote-start
  • By selecting Remote Start All, all the slave systems will get started. We can see in jmeter-server.bat file of slave machines.
    starting-test-on-host
  • We will get the test results in Master-JMeter GUI itself.
  • To run the test through command line (NON-GUI MODE):

    1. After setting up JMeter and turning off the system firewall.
    2. In slave machine go to CL (Command Line) and set the path to JMeter-bin and give the following command:
      - jmeter-server.bat -Djava.rmi.server.hostname=54.215.185.156 (ip of slave machine) say enter we can see the end point to 54.215.185.156.
      jmeter-path-setting
    3. Now in Master machine open CL and set the path to JMeter-bin and pass the following command:
      - jmeter.bat -n -t nameofjmx.jmx -l sample.jtl -R 192.168.10.01,192.168.10.02,192.168.10.03 (Slave machine ips).
    4. You can find the remote engines have been started in Master.
      configuring-remote-engine
    5. After the completion of test take the jtl file and browse it in JMeter GUI to get Aggregate Report or any other Graphs.

People Also View