Distributed Testing in JMeter

Distributed Testing enables having a local JMeter (master) that handles the test execution, together with multiple remote JMeter instances (slaves) that will send the request to our target server. Distributed Testing is a kind of Testing that uses various systems to perform Stress Testing.

Distributed testing is applied for testing websites and server applications when they are working with multiple clients simultaneously.

There are some limitations if you're running your load test in your machine :

  • RMI cannot communicate across subnets without a proxy; therefore, neither can JMeter without a proxy.
  • Since version 2.9, JMeter sends all the test results stripping Response data to the controlling console, and this allows us to reduce the impact on network IO.
  • Ensure you monitor your network traffic so that this traffic does not incur contention
  • A single JMeter client running on a 2-3 GHz CPU (recent CPU) can handle 1000-2000 threads depending on the type of test.

Example : If you want to run the Load Test in JMeter of 5000 users, with the limited memory configuration and RAM Configuration. After some user's execution, your local system will not support the further execution of 5000 Users.

If you still try to execute the 5000 Users, then you will get the wrong Outputs. That's why it is not recommended to use 5000 users on a single machine.

Recordring Test Scripts in JMeter

The Architecture of JMeter Distributed Mode

Distributes Testing uses the Client-Server Model as the Figure below :

  • Master : The system running JMeter GUI, control each slave.
  • Slave : The system running JMeter-server, receives a command from the master and sends a request to a server under test.
  • Target : The web server under test, gets a request from slaves.

Before being able to run JMeter in a distributed way, there are a couple of simple steps you must perform :

  • First, we need to have multiple computers. If not at least two computers.
  • Then we need to get the JMeter server running on each slave system that we have.
  • For that purpose, we have to execute the jmeter-server.bat (jmeter-server for Unix users) that is located in the jmeter/bin.
  • The firewalls on the systems are turned off, or the correct ports are opened.
  • All the clients are on the same subnet.
  • The server is in the same subnet if 192.x.x.x or 10.x.x.x IP addresses are used.
  • If the server doesn't use 192.xx or 10.xx IP address, there shouldn't be any problems.
  • Make sure JMeter can access the server.
  • Make sure you use the same version of JMeter and Java on all the systems. Mixing versions will not work correctly.
  • You have set up SSL for RMI or disable it.
  • Once you've made sure the systems are ready, it's time to set up remote Testing.

The following Example Demonstrates how to run Test Plans in Distributed Mode:

  • The Very First thing do perform remote Testing, we should have Two computers or Two Systems.
  • In both the systems, we should have JMeter installed with the Same version.
  • We can connect these two systems through Team Viewer.
  • Download and install the Team viewer in both the systems of the same version and connect each other by using the provided user ID and password.
  • Now you can control the slave system remotely.
  • The one which is present in the Team viewer is the Slave machine, and my local system is the Master machine.
  • Open the JMeter bin folder of your slave system and click on the JMeter.properties file.
  • Once the Jmeter.properties file has been opened in the Editor, search for server.rmi.ssl.disable and then by default, the server.rmi.ssl.disable as assigned to false, make it true and then uncomment it as shown below.
  • In the Same bin folder, run the Jmeter-Server batch file, once you double click on it, you will find that the command prompt window, which is displaying the message as below. In that copy, the IP address and paste it in the notepad or WordPad for future use.
  • When you receive the below message, it means that you have successfully started the JMeter Server.
  • Next, we have to go to the master and have to update the IP address of the slave in the master machine JMeter.properties.
  • Open the JMeter.properties under the bin folder of your local system and then search for server.rmi.ssl.disable and assign it to true.
  • And in the Same jmeter.properties file, search for remote_hosts and by default, it has set to, now you have to remove this IP Address and paste the IP Address which you have copied from the slave and save it in the notepad for future use.
  • Modifying the IP address of your remote_hosts to the IP address of the remote machine, now JMeter will recognize that, and it connects to that IP address and send your traffic of all your JMeter test to the configured slave machine.
  • Now restart the JMeter in your Master Machine and run the Test plan. Execution will occur over the selected slaves.
  • I have opened one sample Test Plan as below.
  • Now click on the Run tab-->Remote start-->IP Address of slave Machine.
0 results
Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions