Apache JMeter Distributed Testing

Source: Internet
Author: User

Apache JMeter Distributed Testing sub-steps

This short tutorial explains how to use multiple systems to perform stress tests. Before we begin, there are a few things to check.

    • The firewall on the system is turned off or the correct port is opened.
    • All clients are on the same subnet.
    • If you use 192.xxx or 10.xxx IP address , the server is in the same subnet . If the server does not use a 192.xx or 10.xx IP address, there should be no problem.
    • Make sure that the JMeter can access the server.
    • make sure to use the same version of JMeter and Java on all systems. Mixed versions will not work correctly.

Once you have determined that the system is ready, you can start the remote test. This tutorial assumes that you have installed JMeter on all systems. JMeter works by a master controller that initiates tests on multiple subordinate systems.

In this tutorial, we only use GUI mode for demonstration purposes. in real life, you should use non-GUI mode to start your load test

A master controls multiple slaves.

1 Terminology

Before we step through the steps, it's a good idea to define some terminology and ensure clarity.

Main
Run the JMeter GUI system, which controls the test
Slave
Run jmeter-server system that accepts commands from the GUI and sends requests to the target system,
Goal
We're going to stress testing the Web server
System category2 minute steps
  1. on the slave system, go to jmeter/bin directory and execute jmeter-server.bat( on Unix jmeter-server).
  2. on the main system as the console, open Windows Explorer and go to the jmeter/bin directory
  3. Open in a text editor jmeter.properties
  4. Edit Line remote_hosts = 127.0.0.1
  5. add an IP address. For example, if I have run in 192.168.0.10, ...,192.168.0.15 On the JMeter server , the entry will resemble the following:
    Remote_hosts = 192.168.0.10,192.168.0.11,192.168.0.12,192.168.0.13,192.168.0.14
  6. Start JMeter.
  7. Open the test plan you want to use
a simple test plan2 start Test

at this point, you are ready to start the load test. If you want to double-check that the slave system is working, open it in your editor Jmeter.log. You should see the following in the log.

Write log files to:/xxxx/xxxxx/bin/jmeter-server.log  remote object created: Unicastserverref [liveref:[endpoint:[192.xxx:xxxxx] (local), objid:[-  6A665BEB:15A2C8B9419:-7FFF,3180474504933847586] ]

If you don't see this message, it means The jmeter-server did not start correctly. for tips on debugging problems , go to the Tips section . There are two ways to start a test: a system and all systems.

3 Starting a client
    1. Click Run at the top
    2. Select Remote Boot
    3. Select IP Address
start a Slave4 start all clients
    1. Click Run at the top
    2. Select Remote to start all or use Ctrl + Shift + R
start all slaves.5 Limitations

distributed testing has some basic limitations. This is a list of known items, with no specific order.

    1. RMI cannot communicate across subnets without an agent; therefore JMeter also cannot have no agent.
    2. starting with version 2.9, JMeter sends all test result split response data to the console, which can reduce the impact on network IO. Ensure that you monitor your network traffic to prevent traffic from causing contention
    3. A single JMeter client running on the 2-3 GHz CPU (the latest CPU) can process 1000-2000 threads based on the test type.
 7 Hints

In some cases, the firewall may still block RMI traffic.

anti-virus and firewallThe antivirus software should be stopped during the load test because it can seriously affect the time it takes to cause incorrect results.

The firewall needs to be stopped from the Windows service or at least some ports need to be opened.

    1. Open Control Panel
    2. Open Administrative Tools
    3. Double-click Service
    4. Go to Simon Anti-virus, right-click and select Stop
Windows Firewall
    1. Open Network Connection
    2. Select Network Connection
    3. Right-click and select Properties
    4. Select the Advanced tab
    5. Uncheck Internet Connection Firewall
of Linux

on Redhat (or derivative products), iptables is turned on by default. Execution

Service Iptables Stop
Stop the Linux firewall or make sure that you open the correct port.

Apache JMeter Distributed Testing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.