Apache Bench reports different result with same page

Posted by Aspis on Server Fault See other posts from Server Fault or by Aspis
Published on 2012-12-08T09:23:53Z Indexed on 2012/12/08 11:14 UTC
Read the original article Hit count: 268

Filed under:
|
|

I'm running into a little problem base-lining an Apache2/fcgi/php-fpm server I am setting up.

1) If I run: ab -n 15000 http://mysite.com/index.php. Apache Bench returns Time per request: 41ms but document length: 0 bytes and html transferred: 0 bytes. The Transfer rate: 7.9Kb/s.

2) If I run: ab -n 15000 http://mysite.com/ Apache Bench returns Time per request: 83ms along with the accurate document length and html transferred total.

The APC cache status reports identical hit counts from both test. Also Apache Bench reports no errors in either case. Overall, no errors on any test sites and all logs are clean, etc. DocumentRoot is set to index.php so I would expect both of these test runs to produced a similar result.

My 2 question(s) are: 1) why the discrepancy? 2) which is the correct result?

I've seen plenty of results like test 1 posted (with out question) but frankly from my own experience and those of others, accurate testing is hard to come by. Even with out goofy issues like this.

© Server Fault or respective owner

Related posts about apache2

Related posts about testing