我在PHP,Lighttpd中有一個網站。它還在Centos 5上使用MySQL。我已經用Apache Bench(ab)的代碼測試了我的PHP。它導致了一些錯誤(失敗的請求),表明其他長度比正常。我絕對相信我的PHP結果應該始終具有相同的確切長度。我檢查了我的Lighttpd和MySQL日誌和錯誤日誌,並且沒有任何錯誤。我的ApacheBench負載測試結果中的長度失敗請求
有沒有什麼辦法來檢查什麼時候結果有其他的長度或有任何其他方式找出的原因是什麼或什麼是「壞」的結果AB獲得什麼?
我需要知道,因爲我需要有100%的好成績。
-bash-3.2# ab -n 500 -c 200 http://domain.com/test/index.php
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking domain.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Finished 500 requests
Server Software: lighttpd/1.4.20
Server Hostname: domain.com
Server Port: 80
Document Path: /test/index.php
Document Length: 15673 bytes
Concurrency Level: 200
Time taken for tests: 0.375862 seconds
Complete requests: 500
Failed requests: 499
(Connect: 0, Length: 499, Exceptions: 0)
Write errors: 0
Total transferred: 7920671 bytes
HTML transferred: 7837000 bytes
Requests per second: 1330.28 [#/sec] (mean)
Time per request: 150.345 [ms] (mean)
Time per request: 0.752 [ms] (mean, across all concurrent requests)
Transfer rate: 20579.36 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 10 9.4 6 30
Processing: 0 113 133.5 16 342
Waiting: 0 111 134.3 12 341
Total: 0 123 138.9 16 370
Percentage of the requests served within a certain time (ms)
50% 16
66% 235
75% 289
80% 298
90% 331
95% 345
98% 365
99% 368
100% 370 (longest request)
**匿名用戶評論(拒絕編輯):**注意:'ab'預計所有回覆的大小相等。如果有可能你的輸出大小不同,你應該忽略「失敗的請求」,因爲「ab」會認爲它們失敗。 – Anne 2011-12-12 22:14:21