You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jerry Baker <je...@weirdness.com> on 2001/08/09 05:23:03 UTC

Apache Bench and Wild Fluctuations

Sometimes 2.0.24-dev is faster, and sometimes it is a lot slower using
localhost to bench it. Here are the results for 5 test conducted with ab
-n 1000 -c 100 http://localhost/:

Requests per second: 356.63
Requests per second: 206.78
Requests per second: 350.39
Requests per second:  53.57
Requests per second:  74.69

Is AB not a good benchmark tool, or is the problem with Apache?

-- 
Jerry Baker

PGP Key: http://www.jerrybaker.org/pgp.html

LAME MP3 Encoder Binaries: http://www.jerrybaker.org/lame/
Apache 2.0 Web server Installer: http://www.jerrybaker.org/apache/

Re: Apache Bench and Wild Fluctuations

Posted by Jerry Baker <je...@weirdness.com>.
Greg Ames wrote:
> 
> Jerry Baker wrote:
> >
> > Sometimes 2.0.24-dev is faster, and sometimes it is a lot slower using
> > localhost to bench it. Here are the results for 5 test conducted with ab
> > -n 1000 -c 100 http://localhost/:
> >
> > Requests per second: 356.63
> > Requests per second: 206.78
> > Requests per second: 350.39
> > Requests per second:  53.57
> > Requests per second:  74.69
> >
> > Is AB not a good benchmark tool, or is the problem with Apache?
> 
> You may be seeing all the ephemeral ports getting used up on your ab
> machine.  Doesn't matter whether it's local or not, as far as this
> problem goes.
> 
> If this is Linux and you have the sysctl RPM, you can do:
> 
> sysctl net.ipv4.ip_local_port_range
> 
> to see what you have for ephemeral ports.  The default is around 4K
> IIRC.
> 
> To change it, do (as root):
> 
> sysctl -w net.ipv4.ip_local_port_range="1024 65000"
> 
> to set it to something reasonable for a web benchmarking client box.
> 
> If you're curious, you can also do:
> 
> netstat -t | grep TIME_WAIT | wc
> 
> to see all how many connections you have stuck in this state when you
> see the problem.
> 
> Greg

The problem is cured by taking focus away from the AB window. This is on
Win32. For some reason if the DOS window has focus, it can get really
slowed down - even if out put is redirected to a file.

-- 
Jerry Baker

PGP Key: http://www.jerrybaker.org/pgp.html

LAME MP3 Encoder Binaries: http://www.jerrybaker.org/lame/
Apache 2.0 Web server Installer: http://www.jerrybaker.org/apache/

Re: Apache Bench and Wild Fluctuations

Posted by Greg Ames <gr...@remulak.net>.
Jerry Baker wrote:
> 
> Sometimes 2.0.24-dev is faster, and sometimes it is a lot slower using
> localhost to bench it. Here are the results for 5 test conducted with ab
> -n 1000 -c 100 http://localhost/:
> 
> Requests per second: 356.63
> Requests per second: 206.78
> Requests per second: 350.39
> Requests per second:  53.57
> Requests per second:  74.69
> 
> Is AB not a good benchmark tool, or is the problem with Apache?

You may be seeing all the ephemeral ports getting used up on your ab
machine.  Doesn't matter whether it's local or not, as far as this
problem goes. 

If this is Linux and you have the sysctl RPM, you can do:

sysctl net.ipv4.ip_local_port_range

to see what you have for ephemeral ports.  The default is around 4K
IIRC.

To change it, do (as root):

sysctl -w net.ipv4.ip_local_port_range="1024 65000"

to set it to something reasonable for a web benchmarking client box.

If you're curious, you can also do:

netstat -t | grep TIME_WAIT | wc

to see all how many connections you have stuck in this state when you
see the problem.

Greg

Re: Apache Bench and Wild Fluctuations

Posted by Ian Holsman <ia...@cnet.com>.
If you >really< want to benchmark the webserver,
you need to run the load generator from another machine.


Jerry Baker wrote:

>Jerry Baker wrote:
>
>>Sometimes 2.0.24-dev is faster, and sometimes it is a lot slower using
>>localhost to bench it. Here are the results for 5 test conducted with ab
>>-n 1000 -c 100 http://localhost/:
>>
>>Requests per second: 356.63
>>Requests per second: 206.78
>>Requests per second: 350.39
>>Requests per second:  53.57
>>Requests per second:  74.69
>>
>>Is AB not a good benchmark tool, or is the problem with Apache?
>>
>>--
>>Jerry Baker
>>
>
>Hmmm. I have noticed that when AB slows down that if I give focus to
>another window it speeds up again. Odd.
>




Re: Apache Bench and Wild Fluctuations

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Jerry, in Win2K talking to the same machine's server, I've observed this.

Using ab on WinNT, testing the Win2K server, I don't see it.

Very odd, I'm certain that the console command window Win32 handlers on 
Win2K are interfering, somehow, someway.  

----- Original Message ----- 
From: "Jerry Baker" <je...@weirdness.com>
To: <ne...@apache.org>
Sent: Wednesday, August 08, 2001 10:29 PM
Subject: Re: Apache Bench and Wild Fluctuations


> Jerry Baker wrote:
> > 
> > Sometimes 2.0.24-dev is faster, and sometimes it is a lot slower using
> > localhost to bench it. Here are the results for 5 test conducted with ab
> > -n 1000 -c 100 http://localhost/:
> > 
> > Requests per second: 356.63
> > Requests per second: 206.78
> > Requests per second: 350.39
> > Requests per second:  53.57
> > Requests per second:  74.69
> > 
> > Is AB not a good benchmark tool, or is the problem with Apache?
> > 
> > --
> > Jerry Baker
> 
> Hmmm. I have noticed that when AB slows down that if I give focus to
> another window it speeds up again. Odd.
> 
> -- 
> Jerry Baker
> 
> PGP Key: http://www.jerrybaker.org/pgp.html
> 
> LAME MP3 Encoder Binaries: http://www.jerrybaker.org/lame/
> Apache 2.0 Web server Installer: http://www.jerrybaker.org/apache/
> 



Re: Apache Bench and Wild Fluctuations

Posted by Jerry Baker <je...@weirdness.com>.
Jerry Baker wrote:
> 
> Sometimes 2.0.24-dev is faster, and sometimes it is a lot slower using
> localhost to bench it. Here are the results for 5 test conducted with ab
> -n 1000 -c 100 http://localhost/:
> 
> Requests per second: 356.63
> Requests per second: 206.78
> Requests per second: 350.39
> Requests per second:  53.57
> Requests per second:  74.69
> 
> Is AB not a good benchmark tool, or is the problem with Apache?
> 
> --
> Jerry Baker

Hmmm. I have noticed that when AB slows down that if I give focus to
another window it speeds up again. Odd.

-- 
Jerry Baker

PGP Key: http://www.jerrybaker.org/pgp.html

LAME MP3 Encoder Binaries: http://www.jerrybaker.org/lame/
Apache 2.0 Web server Installer: http://www.jerrybaker.org/apache/

Re: Apache Bench and Wild Fluctuations

Posted by Jerry Baker <je...@weirdness.com>.
Dirk-Willem van Gulik wrote:
> 
> Are you by any chance running AB on the same machine as the web server.
> I've seen this sort of behaviour when things fight with resources.
> 
> Also note the historgram/confidence interval it now prints. I Suspect that
> for these values it warned you that the SD was far too big. 1000/100 is
> not a large number; that is just a couple of seconds...
> 
> Dw

I did not see any histograms in HTML or STDOUT output.

-- 
Jerry Baker

PGP Key: http://www.jerrybaker.org/pgp.html

LAME MP3 Encoder Binaries: http://www.jerrybaker.org/lame/
Apache 2.0 Web server Installer: http://www.jerrybaker.org/apache/

Re: Apache Bench and Wild Fluctuations

Posted by Dirk-Willem van Gulik <di...@covalent.net>.
Are you by any chance running AB on the same machine as the web server.
I've seen this sort of behaviour when things fight with resources.

Also note the historgram/confidence interval it now prints. I Suspect that
for these values it warned you that the SD was far too big. 1000/100 is
not a large number; that is just a couple of seconds...

Dw

On Wed, 8 Aug 2001, Jerry Baker wrote:

> Sometimes 2.0.24-dev is faster, and sometimes it is a lot slower using
> localhost to bench it. Here are the results for 5 test conducted with ab
> -n 1000 -c 100 http://localhost/:
>
> Requests per second: 356.63
> Requests per second: 206.78
> Requests per second: 350.39
> Requests per second:  53.57
> Requests per second:  74.69
>
> Is AB not a good benchmark tool, or is the problem with Apache?
>
>