Server Software: nginx/0.7.53
Server Hostname: 192.168.3.50
Server Port: 8888
Document Path: /
Document Length: 151 bytes
Concurrency Level: 100
Time taken for tests: 107.329 seconds
Complete requests: 10000 (100%处理请求,没有丢失)
Failed requests: 0
Write errors: 0
Total transferred: 3620000 bytes
HTML transferred: 1510000 bytes
Requests per second: 93.17 [#/sec] (mean) 每秒处理请求 93.17 个
Time per request: 1073.293 [ms] (mean)
Time per request: 10.733 [ms] (mean, across all concurrent requests)
Transfer rate: 32.94 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 13 44.3 2 550
Processing: 180 1059 350.5 1065 2665
Waiting: 178 1053 352.3 1058 2664
Total: 194 1071 351.9 1074 2668
Percentage of the requests served within a certain time (ms)
50% 1074
66% 1162
75% 1215
80% 1288
90% 1547
95% 1694
98% 1853
99% 1946
100% 2668 (longest request)
################
由测试结果所得,Nginx for windows 100 个线程每秒只能处理 93 个请求。
如果再启动多一个 ab 来压,加起来就有200个线程,ab结果相当。各端每秒处理93个请求。
但如果你再启动第三ab 进行 100 个线程压力,正在进行的2个ab 其中一个就会被服务端拒绝。
C:\>ab -n 10000 -c 100 https://192.168.1.8/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, https://www.zeustech.net/
Licensed to The Apache Software Foundation, https://www.apache.org/
Server Software: nginx/0.7.52
Server Hostname: 192.168.1.8
Server Port: 80
Document Path: /
Document Length: 151 bytes
Concurrency Level: 100
Time taken for tests: 5.109 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 3620000 bytes
HTML transferred: 1510000 bytes
Requests per second: 1957.19 [#/sec] (mean)
Time per request: 51.094 [ms] (mean)
Time per request: 0.511 [ms] (mean, across all concurrent requests)
Transfer rate: 691.90 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 2.4 0 16
Processing: 16 50 13.3 47 78
Waiting: 0 34 14.4 31 78
Total: 16 51 13.3 47 78
Percentage of the requests served within a certain time (ms)
50% 47
66% 63
75% 63
80% 63
90% 63
95% 63
98% 63
99% 78
100% 78 (longest request)