-1
,所以我「AB -c 50 -n 5000 http://lala.la」今天跑了此命令的服務器上,我得到了這些「神奇」的結果:很差的Web服務器性能
Document Path: /
Document Length: 26476 bytes
Concurrency Level: 50
Time taken for tests: 1800.514 seconds
Complete requests: 2427
Failed requests: 164
(Connect: 0, Receive: 0, Length: 164, Exceptions: 0)
Write errors: 0
Total transferred: 65169733 bytes
HTML transferred: 64345285 bytes
Requests per second: 1.35 [#/sec] (mean)
Time per request: 37093.408 [ms] (mean)
Time per request: 741.868 [ms] (mean, across all concurrent requests)
Transfer rate: 35.35 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 2.7 0 22
Processing: 4335 36740 9513.2 33755 102808
Waiting: 7 33050 8655.1 30407 72691
Total: 4355 36741 9512.4 33755 102808
Percentage of the requests served within a certain time (ms)
50% 33754
66% 37740
75% 40977
80% 43010
90% 47742
95% 56277
98% 62663
99% 71301
100% 102808 (longest request)
這是一個新安裝的Nginx服務器,使用Cloudflare和APC。
不要以爲我曾經見過這麼差的表現,那麼究竟是什麼造成了它呢?
謝謝。
直到你開始排除故障,你纔會知道,但我的猜測會試圖在一次導致內存耗盡和分頁的時候提供太多的請求。 – 2012-07-25 12:15:38
你提到APC這一事實讓我認爲這實際上是「糟糕的PHP性能」。你的頭版有多複雜? – kolbyjack 2012-07-25 12:23:26
我建議更新你的問題來解釋你自己做過的調查研究問題。由於問題可能存在於任何地方,因此您最好將所涉及的所有主要軟件,硬件和網絡組件以及您所做的調整並分別瞭解其性能。 – 2012-07-26 00:29:50