apache / jmeter

Apache JMeter open-source load testing tool for analyzing and measuring the performance of a variety of services
https://jmeter.apache.org/
Apache License 2.0
7.97k stars 2.02k forks source link

Jmeter distributed testing: It took more than 100ms to start 1 slave, and for ten slaves it took more than 1 second, which is too slow to us #6232

Closed slxiao closed 3 months ago

slxiao commented 3 months ago

Expected behavior

We use 1 master and 10 slaves to do distributed load testing. We'd like to do an experiment to send 10 requests in one second with 10 slaves, one request for one slave.

Actual behavior

However we found it took more than 1 second actually. By digging into jmeter master logs, we found it started slave one by one. And for each slave, it took more than 100ms to start up the slave, which is too slow.

image

Here are combined logs of jmeter master and one of the slaves: 10.244.7.40.

2024-01-25 08:28:55,818 INFO o.a.j.e.ClientJMeterEngine: running clientengine run method 2024-01-25 08:28:55,885 INFO o.a.j.e.RemoteJMeterEngineImpl : Creating JMeter engine on host 10.244.7.40 base '.' 2024-01-25 08:28:55,888 INFO o.a.j.s.FileServer: Default base='/opt/jmeter/apache-jmeter-5.4.1/bin' 2024-01-25 08:28:55,888 INFO o.a.j.s.FileServer: Set new base='.' 2024-01-25 08:28:55,889 INFO o.a.j.e.StandardJMeterEngine: Applying properties {} 2024-01-25 08:28:55,890 INFO o.a.j.e.RemoteJMeterEngineImpl: Running test Starting the test on host 10.244.7.40 @ Thu Jan 25 08:28:55 UTC 2024 (1706171335890) 2024-01-25 08:28:55,890 INFO o.a.j.e.StandardJMeterEngine: Running the test! 2024-01-25 08:28:55,918 INFO o.a.j.e.ClientJMeterEngine: sent test to 10.244.7.40 basedir='.' 2024-01-25 08:28:55,918 INFO o.a.j.e.ClientJMeterEngine: Sending properties {} 2024-01-25 08:28:55,920 INFO o.a.j.e.ClientJMeterEngine: sent run command to 10.244.7.40

We can see it takes about 70 ms between "ClientJMeterEngine: running clientengine run method" and "RemoteJMeterEngineImpl : Creating JMeter engine on host 10.244.7.40". These seems the most time consuming step, but after checking the source code I don't get any useful findings.

image

Could anyone help?

Steps to reproduce the problem

2024-01-25 08:28:54,196 INFO o.a.j.JMeter: Copyright (c) 1998-2021 The Apache Software Foundation 2024-01-25 08:28:54,196 INFO o.a.j.JMeter: Version 5.4.1 2024-01-25 08:28:54,196 INFO o.a.j.JMeter: java.version=16.0.2 2024-01-25 08:28:54,196 INFO o.a.j.JMeter: java.vm.name=OpenJDK 64-Bit Server VM 2024-01-25 08:28:54,196 INFO o.a.j.JMeter: os.name=Linux

Jmeter configruation:

JMeter Version

5.4.1

Java Version

16.0.2

OS Version

Linux

slxiao commented 3 months ago

Route cause found!It's because remote servers are started from scratch every time when running distributed testing. If I keep the remote servers running, and then run distributed testing, latency will be about 20ms one slave. So this issue can be closed.

slxiao commented 3 months ago

closed as issue solved