Distributed Environment Apache JMeter

The previous tutorial was about applying normal stress on server through Apache JMeter and now we will continue with Remote testing by setting up the distributed environment for applying heavy load on servers to check its maximum load capacity.

Example:  jmeter -n -t my_test.jmx -l log.jtl


  • my_test.jmx is the script file
  • log.jtl is the file where results are stored
  • -n tells JMeter to run in non-GUI mode
  • -t tells the path of the .jmx script to run
  • -l tells where to store the final results

Reason of Remote Testing

To stimulate larger stress on servers with lots of client and with many low end computers.
Single Master (JMeter GUI, which controls the test)will manage multiple slaves(JMeter Engines).

How to create the environment

Following are the steps to setup distributed environment in Apache JMeter

  • Visit jmeter/bin directory and execute jmeter-server.bat on the slave systems.
  • Open jmeter-server.bat in editable mode and find “:setCP”
  • Edit “START rmiregistry” to the full path. Example: “START C:\\jre\bin\rmiregistry”
  • On master system acting as the console, go to jmeter/bin directory
  • Open jmeter.properties in a text editor
  • Edit the line “remote_hosts=”
  • Add the IP address. For example, if  jmeter server is running on servers such as, 11, 12, 13, and 14, then edit remote_hosts=,,,,
  • Start jmeter.
  • Open the test plan you want to run and click on "Remote Start All" or "Remote Start" for testing to be started

Remote Testing


  • Make sure all the nodes are using same version of JMeter
  • Since JMeter sends all the test results to the controlling console, it can overload the system.Best tactic is to save the result and view the file later with one of the graph listeners.
  • JMeter have default configuration a heap space of 512 megabytes only (see jmeter.bat for Windows) ,so solution to this is to increase the heap size to the 80% of your available physical RAM ,by searching for the line in jmeter.bat file "HEAP=-Xms512m -Xmx512m" and edit it to HEAP="-Xms512m -Xmx4096m" if you want to set the maximum heap size to 4 gigabytes.
  • To apply changes,restart the JMeter.

Post a Comment

Previous Post Next Post