我在 jmeter 测试结束时遇到了一些奇怪的行为。
我正在使用 Master-Slave 和 4 个从属服务器,它们在另一个机器上托管的 4 个单独的虚拟机上运行。
测试在“保持”期间运行良好,此测试为 3 分钟。但是它只是在那里停留了大约 5 分钟,即使所有线程都“完成”,偶尔也会报告一些回复。
./jmeter.sh -n -t /root/wordpress32sites_url2.jmx -l csvfilename -e -o htmlfoldername -R jmeter01,jmeter02,jmeter03,jmeter04
Creating summariser <summary>
Created the tree successfully using /root/wordpress32sites_url2.jmx
Configuring remote engine: jmeter01
Configuring remote engine: jmeter02
Configuring remote engine: jmeter03
Configuring remote engine: jmeter04
Starting remote engines
Starting the test @ Fri Mar 01 17:25:07 PST 2019 (1551489907760)
Remote engines have been started
Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445
summary + 12305 in 00:00:18 = 695.3/s Avg: 85 Min: 23 Max: 560 Err: 0 (0.00%) Active: 320 Started: 288 Finished: 0
summary + 49400 in 00:00:30 = 1648.4/s Avg: 322 Min: 26 Max: 7698 Err: 0 (0.00%) Active: 640 Started: 608 Finished: 0
summary = 61705 in 00:00:48 = 1294.5/s Avg: 275 Min: 23 Max: 7698 Err: 0 (0.00%)
summary + 48300 in 00:00:30 = 1607.5/s Avg: 402 Min: 28 Max: 10509 Err: 0 (0.00%) Active: 640 Started: 608 Finished: 0
summary = 110005 in 00:01:18 = 1415.5/s Avg: 331 Min: 23 Max: 10509 Err: 0 (0.00%)
summary + 48200 in 00:00:30 = 1603.1/s Avg: 404 Min: 32 Max: 9567 Err: 0 (0.00%) Active: 640 Started: 608 Finished: 0
summary = 158205 in 00:01:48 = 1467.9/s Avg: 353 Min: 23 Max: 10509 Err: 0 (0.00%)
summary + 47100 in 00:00:30 = 1574.4/s Avg: 415 Min: 33 Max: 10351 Err: 0 (0.00%) Active: 640 Started: 608 Finished: 0
summary = 205305 in 00:02:18 = 1491.0/s Avg: 367 Min: 23 Max: 10509 Err: 0 (0.00%)
summary + 48400 in 00:00:30 = 1615.0/s Avg: 403 Min: 33 Max: 10830 Err: 0 (0.00%) Active: 640 Started: 608 Finished: 0
summary = 253705 in 00:02:48 = 1513.2/s Avg: 374 Min: 23 Max: 10830 Err: 0 (0.00%)
summary + 46500 in 00:00:30 = 1546.4/s Avg: 412 Min: 32 Max: 10453 Err: 0 (0.00%) Active: 324 Started: 608 Finished: 316
summary = 300205 in 00:03:18 = 1518.2/s Avg: 380 Min: 23 Max: 10830 Err: 0 (0.00%)
summary + 3717 in 00:05:01 = 12.3/s Avg: 384 Min: 29 Max: 8782 Err: 0 (0.00%) Active: 0 Started: 608 Finished: 640
summary = 303922 in 00:08:19 = 608.8/s Avg: 380 Min: 23 Max: 10830 Err: 0 (0.00%)
summary + 87 in 00:00:00 = 7909.1/s Avg: 473 Min: 36 Max: 5197 Err: 0 (0.00%) Active: 0 Started: 608 Finished: 640
summary = 304009 in 00:08:19 = 608.9/s Avg: 380 Min: 23 Max: 10830 Err: 0 (0.00%)
Tidying up remote @ Fri Mar 01 17:33:31 PST 2019 (1551490411593)
... end of run
Creating summariser <summary>
JMeter slave 没有报告任何感兴趣的内容:
./jmeter-server
Created remote object: UnicastServerRef2 [liveRef: [endpoint:[10.1.1.28:21458,SSLRMIServerSocketFactory(host=jmeter09.ovirt.pb.lab/10.1.1.28, keyStoreLocation=rmi_keystore.jks, type=JKS, trustStoreLocation=rmi_keystore.jks, type=JKS, alias=rmi),SSLRMIClientSocketFactory(keyStoreLocation=rmi_keystore.jks, type=JKS, trustStoreLocation=rmi_keystore.jks, type=JKS, alias=rmi)](local),objID:[-5880d2c8:169394dd3fb:-7fff, -3132663786122032135]]]
Starting the test on host jmeter09 @ Fri Mar 01 12:54:27 UTC 2019 (1551444867945)
Finished the test on host jmeter09 @ Fri Mar 01 13:02:52 UTC 2019 (1551445372516)
如果我中断对 Master 的测试,奴隶会在最后 5 分钟内继续“运行测试”(在实际的 3.5 分钟之后它应该已经运行),然后我才能再次使用它们。
以下是我在上面提到的 JMX 文件中的详细信息:
<stringProp name="TargetLevel">5</stringProp>
<stringProp name="RampUp">0.5</stringProp>
<stringProp name="Steps">1</stringProp>
<stringProp name="Hold">3</stringProp>
我认为这是一个不相关的注释,但是:除了上述之外,测试运行得非常好,尽管它报告我有更多的“活动”线程然后“开始” - 它似乎并没有真正影响测试并且似乎已经改变由 RampUp 时间(低于 0.5)。0 RampUp 时间导致仅 320 启动,而 RampUp 为 1 显示所有启动。