5 messages in ru.sysoev.nginxRe: httperf results with nginx and ap...
FromSent OnAttachments
Joe WilliamsFeb 27, 2008 3:19 pm 
Igor SysoevFeb 28, 2008 3:22 am 
Joe WilliamsFeb 28, 2008 8:29 am 
Igor SysoevFeb 28, 2008 8:36 am 
Joe WilliamsFeb 28, 2008 8:50 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: httperf results with nginx and apacheActions...
From:Joe Williams (joe-@public.gmane.org)
Date:Feb 28, 2008 8:29:32 am
List:ru.sysoev.nginx

Keepalives did the trick, thanks for the advice!

Are keepalives on by default in Nginx?

-Joe

Igor Sysoev wrote:

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.