我使用embed jetty / tomcat加载测试spring boot应用程序,我的行为很奇怪。我使用apache ab进行测试
ab -n 100000 -c 1000 http://127.0.0.1:8080/ping
Server Software:
Server Hostname: 127.0.0.1
Server Port: 8080
Document Path: /ping
Document Length: 2 bytes
Concurrency Level: 1000
Time taken for tests: 5.253 seconds
Complete requests: 100000
Failed requests: 0
Total transferred: 17000000 bytes
HTML transferred: 200000 bytes
Requests per second: 19038.05 [#/sec] (mean)
Time per request: 52.526 [ms] (mean)
Time per request: 0.053 [ms] (mean, across all concurrent requests)
Transfer rate: 3160.61 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 37 222.1 0 3006
Processing: 0 7 21.9 3 855
Waiting: 0 7 21.7 3 853
Total: 0 44 228.0 4 3052
Percentage of the requests served within a certain time (ms)
50% 4
66% 7
75% 9
80% 11
90% 22
95% 39
98% 1004
99% 1017
100% 3052 (longest request)
所以有些请求被卡在某处 有了码头,我尝试了不同的价值观:
_maxThreads, _minThread
与tomcat:
max-connections, max-threads, min-spare-threads
在分析器中我找到了下一个:
org.eclipse.jetty.util.thread.QueuedThreadPool$2.run() 16,215ms
org.eclipse.jetty.util.thread.QueuedThreadPool.access$800
org.eclipse.jetty.util.thread.QueuedThreadPool.iddleJobPoll
org.eclipse.jetty.util.BlockingArrayQueue.poll 13,915ms
谢谢!
答案 0 :(得分:0)