Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

JMeter distributed pressure measurement

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

1. Distributed pressure testing principle:

Using Master-Slave mode, using Mastercomputer to control multiple slave loaders and sending requests to the tested server, which can support tens of thousands of large concurrency.

The Mastercomputer is responsible for distributing, starting, stopping, collecting test results from slave, etc.

two。 Environmental preparation

(1) master and all slave have installed the same version of JDK and JMeter, and configured the environment variables.

To install jdk, please refer to: https://blog.51cto.com/11009785/2376310

Install JMeter reference: https://blog.51cto.com/11009785/2388386

(2) windows and linux can be used for master and slave, but it is best to use linux.

(3) master and slave are both in the same network segment.

3. Test procedure

(1) modify slave configuration and start jmeter-server

Modify jmeter.properties:

-server_port=1234 (customize the port number to avoid being occupied)

-server.rmi.localport=1234 (same as the port number set above)

-server.rmi.ssl.disable=true

Modify jmeter-server:

-RMI_HOST_DEF=-Djava.rmi.server.hostname=192.168.0.106 (bind native ip)

Start jmeter-server (jmeter-server.bat for windows) under the jmeter bin directory on the slave machine, and record ip and port

(2) modify master configuration and start slave remotely

Modify jmeter.properties:

-server.rmi.ssl.disable=true

-remote_hosts=192.168.0.106:1234 (corresponding to ip and port configured on slave)

Note: if there are multiple slave, separate multiple ip and port with commas, such as remote_hosts=ip1:port1,ip2:port2

On the master computer, open the test script and start-- > start the slave machine remotely. You can start a single slave or all of them.

You can use listeners such as aggregating reports and viewing result trees on master to view the execution of slaves in real time.

4. Matters needing attention

(1) the result of master statistics is the sum of all slave data.

Total number of distributed test samples = number of threads x cycles x number of slave loaders

(2) if master and slave cannot be connected, it may be due to the firewall. To disable the system firewall, how to disable it, please see:

Https://blog.51cto.com/11009785/2388623

(3) if no running result is returned in the listener, there may be a problem with the network or a problem with the parameter file path.

The logs that can be viewed are: jmeter-server.log under the jmeter bin directory of the slave machine

The articles that can be referenced are:

Https://blog.51cto.com/11009785/2388476

Https://blog.51cto.com/11009785/2388615

(4) when the script has dependent files, it must be copied to the same directory on the server (jmeter bin directory is recommended to avoid errors)

(5) when viewing the result tree, you will find that it is normal that there is only a request but no response, as shown in the figure below.

If necessary, you can set assertions so that you can know the success or failure of the request even if you do not see the response

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report