Distributed load testing using Apache jMeter

This post is based on assumption that user knows basics of creating test cases using Apache jMeter.

There are limitations on the number of requests that can be simulated for load testing from a single machine. Distributed testing comes to the rescue. In a distributed setup there is one controller called master and number of slaves controlled by master.  Distributed load testing can be tricky and may produce incorrect results if not configured correctly. Test results depends on the following factors.
  1. Network bandwidth.
  2. Master and slave systems configuration including memory, processor speed.
  3. Configuration of the load testing tool like number of users running in parallel.
Following are the snapshots of sample load test results under two different environments using jMeter.

Setup 1:
  1. 1 Master controller - Quad Core 3.00GHz 8GB memory,
  2. 7 Slaves all with Intel(R) Xeon(R) CPU, E5420 @2.50GHz, 2.49 GHz, 2.00 GB of RAM
Setup 1
Setup 2:
  1. 1 Master controller an Amazon EC2 instance – Dual Core 2.6GHz 2GB memory
  2. 12 Slaves with similar configuration as Master
Setup 2
It is obvious that setup 2 produces better results. Steps to create Amazon account and configuration EC2 instances can be found in another post on this blog.
  1. Following are the steps for load testing setup using Amazon cloud.
  2. Open elastic fox, a firefox plugin for managing EC2 instances. From the images tab in elasticfox search for ‘jMeter’. You may find existing EC2 instances for master and slaves. Alternatively you can create an instance of existing linux AMI with JDK installed and JAVA_HOME environment variable is setup. You can create any number of slaves from instances -> right click on slave instance ->Launch more of these.
  3. Download and install jMeter by unzipping the tar file to home directory (or any other directory) of master and slave instances.
          Following assumptions are made for the next steps    
              i)  Installed jMeter version is jakarta-jmeter-2.4
              ii) jMeter Installed in /home directory
    4.   jMeter updates and aggregates the results from all slaves instantly which may consume           heavy resources of master and may result in system halt for large scale load testing.           Update /bin/jmeter.properties as shown below. 
          mode=Batch
          num_sample_threshold=100
          jMeter running with ‘Batch’ mode collects and aggregates the results if it exceeds the   
          num_sample_threshold value.
          Specify slaves’ public dns name separated by comma.
          remote_hosts=slave1_public_dns, slave2_public_dns
    5.  Navigate to /bin directory and start slave by running
         jmeter-server
    6.  Navigate to /bin directory and start master by running jmeter.sh from bin directory as          below.
         jmeter
        You may run jMeter with increased heap memory as shown below
        JVM_ARGS="-Xms512m -Xmx512m" jmeter
   7.  From jMeter user interface click ‘Run->Remote Start All’ as shown in the image below to         start test case on all slaves.

   8.  After completion of running test cases shutdown all slaves from Run->Remote Stop All
   9.  You may shutdown Amazon EC2 instances from elasticfox. Right click on each instance         and click terminate.

12 comments:

  1. paper testing machine- We offer a good vary of high quality paper testing machine that is factory-made by extremely accomplished professionals victimisation exquisite techniques and technologies. Our offered paper Testing Machine is thought best for its smart strength, hassle free operation, simple installation, less maintenance and high tensile resistance. to confirm the standard, we tend to use quality tested staple that area unit procured from the foremost documented vendors of the market. thanks to its impeccable quality attributes and cheap evaluation, these area unit wide demanded by our prestigious shoppers and employed in varied industries.

    ReplyDelete
  2. The blog gave me idea to perform distributed Load Testing using apache My sincere thanks for sharing this post Please countinue to share this kind of post
    Software Testing Training in Chennai

    ReplyDelete
  3. Very well written article. I really enjoy reading your blog. Thank you for sharing productive content with us. Keep sharing this kind of useful information to our vision.
    Selenium Training in Chennai | Software Testing Training in Chennai

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. Pretty article! I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing..


    Software Testing Training in Bangalore

    Software Testing Training in BTM Layout

    Software Testing Training in Marathahalli

    ReplyDelete
  6. Pretty article! I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing..

    Selenium Training in Chennai


    ReplyDelete
  7. Thanks for sharing valuable information and it is useful for onlineitguru provides the best selenium Online Training Bangalore

    ReplyDelete

Please leave a comment related to the post.