我用 ab 200 个并发 60000 次请求 服务器没多大压力 结果如下:
Concurrency Level: 200
Time taken for tests: 14.812 seconds
Complete requests: 60000
Failed requests: 0
Total transferred: 42060000 bytes
HTML transferred: 28560000 bytes
Requests per second: 4050.64 [#/sec] (mean)
Time per request: 49.375 [ms] (mean)
Time per request: 0.247 [ms] (mean, across all concurrent requests)
Transfer rate: 2772.95 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.4 0 7
Processing: 4 47 112.2 34 3049
Waiting: 4 47 112.2 34 3049
Total: 8 47 112.2 34 3049
Percentage of the requests served within a certain time (ms)
50% 34
66% 36
75% 38
80% 40
90% 44
95% 49
98% 68
99% 1022
100% 3049 (longest request)
但是同事用 php 开了 30 个进程 同时请求 服务器会概率性报 502, 60000 个请求下来, 错误的请求非常多
错误日志:
2016/09/26 18:27:37 [crit] 21240#0: *1235685 connect() to 172.17.10.173:7007 failed (99: Cannot assign requested address) while connecting to upstream, client: 172.17.10.173, server: 172.17.10.173
看了 nginx 的访问日志, ab 测试的时候 每秒请求达到 4 千多次
但是同事的请求每秒才三千多 为啥同事的请求会有很多失败的呢? 谁能解答一下疑惑吗 不胜感激了
Concurrency Level: 200
Time taken for tests: 14.812 seconds
Complete requests: 60000
Failed requests: 0
Total transferred: 42060000 bytes
HTML transferred: 28560000 bytes
Requests per second: 4050.64 [#/sec] (mean)
Time per request: 49.375 [ms] (mean)
Time per request: 0.247 [ms] (mean, across all concurrent requests)
Transfer rate: 2772.95 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.4 0 7
Processing: 4 47 112.2 34 3049
Waiting: 4 47 112.2 34 3049
Total: 8 47 112.2 34 3049
Percentage of the requests served within a certain time (ms)
50% 34
66% 36
75% 38
80% 40
90% 44
95% 49
98% 68
99% 1022
100% 3049 (longest request)
但是同事用 php 开了 30 个进程 同时请求 服务器会概率性报 502, 60000 个请求下来, 错误的请求非常多
错误日志:
2016/09/26 18:27:37 [crit] 21240#0: *1235685 connect() to 172.17.10.173:7007 failed (99: Cannot assign requested address) while connecting to upstream, client: 172.17.10.173, server: 172.17.10.173
看了 nginx 的访问日志, ab 测试的时候 每秒请求达到 4 千多次
但是同事的请求每秒才三千多 为啥同事的请求会有很多失败的呢? 谁能解答一下疑惑吗 不胜感激了