我正在运行2种不同实现的wrk基准测试(请参见下面的结果)。
我不明白较低延迟的实现(“ OLD”)如何每秒获得更少的请求。
旧版本的平均延迟时间为150ms,每秒可接收21个请求,而新版本的平均延迟时间为390ms和每秒49个请求。
我期望相反:更低的延迟可以每秒获得更多请求...
“旧”:
wrk -t5 -c20 -d10s --timeout 1s --latency https://old
Running 10s test @ https://old
5 threads and 20 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 152.47ms 89.32ms 757.56ms 94.81%
Req/Sec 7.76 2.78 10.00 70.67%
Latency Distribution
50% 133.56ms
75% 153.22ms
90% 170.08ms
99% 727.16ms
212 requests in 10.08s, 9.05MB read
Requests/sec: 21.04
Transfer/sec: 0.90MB
“新”:
wrk -t5 -c20 -d10s --latency --timeout 1s https://new
Running 10s test @ https://new
5 threads and 20 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 389.86ms 74.52ms 618.33ms 70.62%
Req/Sec 11.65 6.86 30.00 61.25%
Latency Distribution
50% 375.55ms
75% 431.85ms
90% 493.65ms
99% 578.83ms
497 requests in 10.08s, 21.93MB read
Requests/sec: 49.30
Transfer/sec: 2.17MB