Distributed Testing in JMeter - Master Slave Configuration in Windows OS

Distributed load testing in JMeter is the process of simulating large number of virtual users using multiples systems or load generators. One single machine may not be able to generate the desired virtual users for a load test due to its hardware capacity limitations and hence JMeter allow us to connect multiple machines to achieve the goal. In JMeter, this is achieved by creating a Master-Slave configuration.

For Example, You want to run a load test with 1000 virtual users but what if your machine is unable to generate more than 500 virtual users ? To overcome this issue, you can use the distributed testing in JMeter.

Master: The system running Jmeter GUI, which controls the test.
Slave: the system running jmeter-server, which takes commands from the GUI and send requests to the target system(s). In other words, it’s the load generator machine which create the threads and send request to target system to simulate the user load.
Target: the web server under test, get a request from slaves.

How to setup master-slave configuration ?
Precondition:

  • The firewalls on the systems are turned off. In some cases, the firewall may still be blocking the traffic. You should disable the Window firewall or Linux firewall.
  • All the machines should be on the same subnet. If machines are not on the same subnet, maybe they will not recognize each other in the network.
  • Use the same version of JMeter to avoid unanticipated errors/issues
1) System configuration

Setup slave systems, go to jmeter/bin directory and execute file "jmeter-server.bat".

On the master systems, go to /bin directory and edit file user.properties, add IP of slave machine in Remote hosts section (comma separated)

Ex:

############Master Slave setup #####################

remote_hosts=192.168.0.10,192.168.0.11,192.168.0.12

2) Run the test
At this point, you are ready to start load testing. On the master machine, run JMeter GUI and open the test plan.
Click Run on the menu bar; select Remote start -> select the IP address of slave machine

Comments

Popular posts from this blog

Welcome to my Performance Testing and Engineering Blog

JMeter Distributed Testing in Linux

Java Heap, Architecture and GC