Distributed load testing:

                      Distributed load testing is the process using which multiple systems are used for simulating load of large number of users. In JMeter, this is achieved by creating a Master-Slave configuration.
The reason of using more than one system for load testing is the limitation of single system to generate large number of threads (users).
For distributed load testing we need to create Master-slave configuration wherein

Before we start,there are a couple of things to check.
  • the firewalls on the systems are turned off.
  • all the clients are on the same subnet.
  • the server is in the same subnet, if 127.0.0.1 ip addresses are used. If the server
  • Make sure JMeter can access the server.
  • Make sure you use the same version of JMeter on all the systems. Mixing versions may not work
  • correctly.

Once you've made sure the systems are ready, it's time to setup remote testing. The tutorial assumes you already have JMeter installed on all the systems. The way JMeter works is 1 master controller initiates the test on multiple slave systems.


Terminology
Before we dive into the step-by-step instructions, it's a good idea to define the terms and make sure
the definition is clear.
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)
Target – the webserver we plan to stress test


Master will control all the slaves and collect the test results.
To make the system work firewall needs to be turned off and all the systems need to be in same subnet. Also, preferably all the systems need to use same version of JMeter and Java.

  1. First of all we need to start the jmeter-server.bat in the slave systems. For this just go to the bin folder inside JMeter home directory and run the batch file jmeter-server.bat(for windows) or jmeter-server (for linux).
  2. Now on the master system open the properties file jmeter.properties and edit the remote_hosts entry. Remove the loopback address's value (127.0.0.1) for the remote_host entry and specify the IP addresses of all the slave systems separated by commas.
In the following screen shot you can see initially only one url is there.


Now i am adding two more hosts under remote hosts and configeration . You can see the same in the below screenshot


Like this you can add the hosts as many you want.

Starting the Test
At this point, you are ready to start load testing. If you want to double check the slave systems are working, open jmeter.log in notepad. You should see the following in the log.
Jmeter.engine.RemoteJMeterEngineImpl: Starting backing engine
If you do not see this message, it means jmeter-server did not start correctly. For tips on debugging the issue, go to the tips section. There are two ways to initiate the test: a single system and all systems.


How to Start a single server   



step1. click Run at the top

step2. select Remote start

step3. select the IP address
(see the screenshot )







How to start all servers
 step1. click Run at the top
step2. select Remote start all or use CRTL-Z (see the screenshot)






No comments:

Post a Comment