httperf results with nginx and apache

Igor Sysoev is at rambler-co.ru
Thu Feb 28 14:22:23 MSK 2008


On Wed, Feb 27, 2008 at 05:20:08PM -0600, Joe Williams wrote:

> I am attempting to do a bit of a comparison between nginx and apache 
> using httperf but my results are coming out a little strange. I am 
> running the following against both apache and nginx:
> 
> > httperf --timeout=5 --client=0/1 --server=DOMAIN --port=80 
> >--uri=/robots.txt --rate=200 --send-buffer=4096 --recv-buffer=16384 
> >--num-conns=5000 --num-calls=10
> 
> The results I am seeing are the following:
> 
> NGINX:
> 
> ><snip>
> >Total: connections 5000 requests 50000 replies 50000 test-duration 
> >25.001 s
> ><snip>
> >Connection rate: 200.0 conn/s (5.0 ms/conn, <=5 concurrent connections)
> ><snip>
> >Request rate: 2000.0 req/s (0.5 ms/req)
> 
> Apache:
> 
> ><snip>
> >Total: connections 5000 requests 10000 replies 5000 test-duration 24.998 s
> ><snip>
> >Connection rate: 200.0 conn/s (5.0 ms/conn, <=1 concurrent connections)
> ><snip>
> >Request rate: 400.0 req/s (2.5 ms/req)
> 
> 
> Shouldn't the 'Total' numbers be the same against both web servers since 
> I am using the same command to test them? Why is the 'requests' number a 
> 1/5 of number that nginx responds with. Has anyone see this sort of 
> result in the past?
> 
> I have attempted this with a few different connection, rate and call 
> counts and seem to get similar results with each.
> 
> I have verified that my MaxClients and Servers setting in Apache is high 
> enough as well.

The difference is probably in keepalive settings.
Look --num-conns=5000 and --num-calls=10 parameters.


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list