JMeter - How to perform Distributed Load Testing?

December 10, 2017
2 mins
Share this post

Frustrated with Frequent App Performance Issues?

Upgrade to seamless speed & reliability with our testing.

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

distributed load testing

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
  • 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.
distributed load testing 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.
distributed load testing server bat file

Is Your App Crashing More Than It’s Running?

Boost stability and user satisfaction with targeted testing.

  • 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).
distributed load testing 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.
distributed load testing 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.
distributed load testing jmeter path setting

  1. 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).
  2. You can find the remote engines have been started in Master.
distributed load testing configuring remote engine

Constantly Facing Software Glitches and Unexpected Downtime?

Discover seamless functionality with our specialized testing services.

  1. After the completion of test take the jtl file and browse it in JMeter GUI to get Aggregate Report or any other Graphs.

To know more about apache JMeter, read here.

Bharti Garg
Author
Our blog

Latest blog posts

Discover the latest in software testing: expert analysis, innovative strategies, and industry forecasts
AI and Testing
Automation Testing

Enhancing Test Automation with AI-Based Similarity Analysis

Rupesh Garg
Rupesh Garg
October 22, 2024
5 min read
API Testing
Testing Tools

How to Test RESTful APIs Effectively Using Postman: Real Examples

Rupesh Garg
Rupesh Garg
October 21, 2024
5 min read
Software Testing
AI and Testing

A Comprehensive Guide to Generative Adversarial Networks (GANs) in QA Testing

Rupesh Garg
Rupesh Garg
October 18, 2024
5 min read