Load/ Capacity Testing
Load testing is a non-functional testing performed to
determine how a system performs in the terms of responsiveness
and stability under a particular workload. It also can serve
to investigate, measure, validate or verify other quality
attributes of the system, such as scalability, reliability and
resource usage.
Why JMeter?
- It is an open source tool.
-
Can load test multiple types of servers
- Web – HTTP, HTTPS
- SOAP
- Database via JDBC
- LDAP
- JMS
- Mail – POP3(S) and IMAP (S)
- User friendly GUI
- Multithreading framework
-
Caching and Cookies can be enabled and it impact as such as
it is executing in the web browser.
-
Controllers are configurable and can monitor the server
performance
- Test Results can be captured in various formats
Why Remote/ Distributed Testing?
-
In the event that your JMeter client machine is unable,
performance-wise, to simulate enough users to stress your
server or is limited at network level, an option exists to
control multiple, remote JMeter engines from a single JMeter
client
-
By running JMeter remotely, you can replicate a test across
many low-end computers and thus simulate a larger load on
the server
-
One instance of the JMeter client can control any number of
remote JMeter instances, and collect all the data from them.
This offers the following features:
- Saving of test samples to the local machine
-
Management of multiple JMeterEngines from a single
machine
-
No need to copy the test plan to each server – the
client sends it to all the servers
Prerequisites:
- AWS account and basic knowledge
- Basic JMeter Knowledge.
- Firewalls on both the Instances should be turned off.
-
Java should be installed on the machines and class path
should be set.
-
The Instances used should be in the same subnet (Public).
-
The Inbound and Outbound rules of Security group under which
the Instance is launched should be open
- Same Version of JMeter on all the Instances
Starting Instances
- Launch Instances on AWS in the same public subnet.
- Once you launch the Instance do a RDP.
Installing JMeter
Master Slave Configuration
Master Instance
-
The Master Instance will be the Instance on which JMeter GUI
will be running and controlling the tests
-
For the Masters Instance following changes have to be made
in the Jmeter.properties file
-
Jmeter.properties file is placed under JMeter bin folder.
-
Go to Remote Hosts and RMI configuration section
-
In the remote_hosts field mention the private IP
addresses of the slave Instances.
- e.g.: remote_hosts=10.1.1.14, 10.1.1.5, etc.
-
For master Instance update the server.rmi.create field to
false, also uncomment the field by removing "#"
- Uncomment the "mode=Asynch" field.
-
Uncomment "asynch.batch.queue.size=" and update the value to
250
- e.g.: asynch.batch.queue.size=250
-
(This setting denotes that, if your machine IP is used as
SLAVE; it will serve 250 users max to run on.)
NOTE: Say you want to run a test on 5 remote slaves with
1000 of users; your Number of Threads (users) in Thread
Group will be 200. (200*5 = 1000 users)
Slave Instances
-
The Slave Instance will be the Instance on which will be
used my Master Instance to run the tests.
-
For the Slave Instance following changes have to be made in
the Jmeter.properties file
-
Jmeter.properties file is placed under JMeter bin folder.
-
Go to Remote Hosts and RMI configuration section
-
In the remote_hosts field mention the private IP address
of the Master Instances.
- e.g.: remote_hosts=10.1.1.14, 10.1.1.5, etc.
-
For slave Instance update the server.rmi.create field to
false, also uncomment the field by removing "#"
- Uncomment the "mode=Asynch" field.
-
Uncomment "asynch.batch.queue.size=" and update the value to
250
- e.g.: asynch.batch.queue.size=250
-
(This setting denotes that, if your machine IP is used as
SLAVE; it will serve 250 users max to run on.)
NOTE: Say you want to run a test on 5 remote slaves with
1000 of users; your Number of Threads (users) in Thread
Group will be 200. (200*5 = 1000 users)
Running the Tests
-
When all the configurations are made in the Master and Slave
Instances run the "JMeter-server" Windows batch File from
all the slave instances.
- This file is located in the bin directory of JMeter

jmeter-server file location
-
Once it is done in all the slave Instances, start the JMeter
GUI of the Master Instance.
- Develop a sample script.
-
In the Master Instance go to "Run" and click on remote
start. All the private IP's of the configured slave
Instances will be displayed.
-
User can also start all the slave Instances at once by
clicking on "Remote Start All".

Remote start the instances