Failed requests: Apache benchmarking (ab) gotcha

When I used the Apache benchmarking tool ab for some simple tests I wondered why it returned a ridiculous number of failed requests for a simple page:

Complete requests:      10000
Failed requests:        8366
   (Connect: 0, Receive: 0, Length: 8366, Exceptions: 0

Wait a minute, length... I realized that ab expects the length (byte size) to be the same for each request, but I was requesting a dynamic page with some random elements, so it counted most of them as failed.

In other words, if you are benchmarking dynamic pages, ignore length errors.

You might also want to use httperf instead of ab.

2011-05-24 ·

blog comments powered by Disqus