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 questions 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.

  • HAve you checked whether there's a difference when asking for those URLs from your browser?
    – Theuni
    Dec 8, 2012 at 17:03

1 Answer 1


@theuni Thanks for the response - yes I checked all the obvious stuff before posting here, they both resolve to index.php so that's not an issue, I figured it out after running curl -I http://mysite.com/index.php which showed that Wordpress (ugh) was redirecting index.php to /. Thus in test 1, ab only reports times based on the redirect portion even though index.php stills runs and effects the server load portion as normal. All such benchmarks are probably invalid and as I mentioned in my first post there are a lot of those on the web. I suppose that a significant number of the benchmark results on the web are only benchmarking redirects instead of the application itself. From my current understanding it looks like that benchmarks that result in document length: 0 bytes and html transferred: 0 bytes are invalid. Google +"ab" +"document length: 0" resulted in 75,600 hits

@Marko thanks for the edit, as I am new here I don't know how to format those command strings and I am unable to locate that information on this site. though I did find some information on formatting post at some point while browsing around.

I also noticed here at serverfault, a related question under a different topic that was essentially the same as this one. (No reference available.) That question was closed by a mod as to "localized." (ugh) If that that thread had been left open a lot of people might have been helped.

  • Don't use "answers" to provide new info or thanks. Edit the FP, or comment on specific answers for thanks. Dec 11, 2012 at 1:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .