You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Philip Mak <pm...@aaanime.net> on 2001/10/28 06:26:41 UTC

ApacheBench says my site is unstable?

I'm using ApacheBench to perform stress testing on my Apache server.
It's not always working, though. Observe the following two runs: (first is
Broken pipe; second has some failed requests)

[pmak@sg1 bin]$ ./ab -n 1000 -c 10 http://65.119.108.120:8080/
This is ApacheBench, Version 1.3c <$Revision: 1.45 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2000 The Apache Group, http://www.apache.org/

Benchmarking 65.119.108.120 (be patient)...Broken pipe

[pmak@sg1 bin]$ ./ab -n 1000 -c 10 http://65.119.108.120:8080/
This is ApacheBench, Version 1.3c <$Revision: 1.45 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2000 The Apache Group, http://www.apache.org/

Server Software:        Apache/1.3.22
Server Hostname:        65.119.108.120
Server Port:            8080

Document Path:          /
Document Length:        13 bytes

Concurrency Level:      10
Time taken for tests:   21.109 seconds
Complete requests:      1000
Failed requests:        22
   (Connect: 0, Length: 22, Exceptions: 0)
Total transferred:      196578 bytes
HTML transferred:       12714 bytes
Requests per second:    47.37
Transfer rate:          9.31 kb/s received

Connnection Times (ms)
              min   avg   max
Connect:       99   101   140
Processing:     5   107   364
Total:        104   208   504

Whenever I try to load that URL in my browser, it works so I think it has
something to do with the performance of httpd under load:

[pmak@sg1 bin]$ lynx -dump http://65.119.108.120:8080/

   Hello, world!

Looking in my access_log, I see failed requests like this:

66.33.60.115 - - [25/Oct/2001:22:20:43 -0700] "GET / HTTP/1.0" 200 0 "-" "ApacheBench/1.3d"

and successful requests like this:

66.33.60.115 - - [27/Oct/2001:21:31:32 -0700] "GET / HTTP/1.0" 200 13 "-" "ApacheBench/1.3c"

Does anyone have an idea what's going on? I can't figure out why some
requests seem to return 0 bytes at random, or why ApacheBench crashes with
"Broken pipe". There is nothing in the VirtualHost or the serverwide error
log other than the MaxClients warning:

66.33.60.115 - - [27/Oct/2001:21:31:32 -0700] "GET / HTTP/1.0" 200 13 "-" "ApacheBench/1.3c"

MaxClients is set to 50, btw.

server1# uname -a
FreeBSD server1.buildreferrals.com 4.2-RELEASE FreeBSD 4.2-RELEASE #0: Fri Oct 12 13:36:14 PDT 2001
root@test23.tesys.com:/usr/src/sys/compile/LOCAL  i386

Apache version is 1.3.22.

Is there a quirk of FreeBSD that I have to account for, perhaps? This is
my first time setting up Apache on a FreeBSD system (I've always used Red
Hat Linux or SunOS before).



Re: ApacheBench says my site is unstable?

Posted by Sander Temme <sc...@covalent.net>.
on 10/27/01 9:26 PM, Philip Mak at pmak@aaanime.net wrote:

> Benchmarking 65.119.108.120 (be patient)...Broken pipe

Hm... I thought the broken pipe errors were fixed.
 
> [pmak@sg1 bin]$ ./ab -n 1000 -c 10 http://65.119.108.120:8080/

Do you run ab on the same box as httpd? That can throw your figures off
considerably. The concurrent load you throw onto the server is not at all
unreasonable though.

> Looking in my access_log, I see failed requests like this:
> 
> 66.33.60.115 - - [25/Oct/2001:22:20:43 -0700] "GET / HTTP/1.0" 200 0 "-"
> "ApacheBench/1.3d"
> 
> and successful requests like this:
> 
> 66.33.60.115 - - [27/Oct/2001:21:31:32 -0700] "GET / HTTP/1.0" 200 13 "-"
> "ApacheBench/1.3c"
> 
> Does anyone have an idea what's going on? I can't figure out why some

Hm... 1.3c vs. 1.3d? Are you using different ab versions? We also have
different dates in the log.

You can increase the verbosity level of ab with the -v flag.

S.

-- 
Covalent Technologies                             sctemme@covalent.net
Engineering group                                Voice: (415) 536 5214
645 Howard St.                                     Fax: (415) 536 5210
San Francisco CA 94105

   PGP Fingerprint: 1E74 4E58 DFAC 2CF5 6A03  5531 AFB1 96AF B584 0AB1

=======================================================
This email message is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited.  If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message
=======================================================


Re: ApacheBench says my site is unstable?

Posted by Dirk-Willem van Gulik <di...@covalent.net>.
On Sun, 28 Oct 2001, Philip Mak wrote:

> MaxClients is 50, so I'm guessing that the number of open files (1064) is
> definitely enough to handle that, right?

Your 'ab' tried to open a significantly higher number of connections if I
recall. You want both to be in the same order; and open files well above
that.

DW


Re: ApacheBench says my site is unstable?

Posted by Philip Mak <pm...@aaanime.net>.
On Sat, 27 Oct 2001, Dirk-Willem van Gulik wrote:

> On FreeBSD; do a
>
> 	ulimit -a
>
> to check the number of files you are allowed to have open. For a non
> privilidged user the default is tipicallyy set to 64 or some similar low
> number.

My limits seem to be high enough:

$ ulimit -a
cpu time               (seconds, -t)  unlimited
file size           (512-blocks, -f)  unlimited
data seg size           (kbytes, -d)  524288
stack size              (kbytes, -s)  65536
core file size      (512-blocks, -c)  unlimited
max memory size         (kbytes, -m)  unlimited
locked memory           (kbytes, -l)  unlimited
max user processes              (-u)  531
open files                      (-n)  1064
sbsize                   (bytes, -b)  unlimited

MaxClients is 50, so I'm guessing that the number of open files (1064) is
definitely enough to handle that, right?

Someone else suggested that it was due to a bug in ApacheBench, and not a
problem in the server itself. Could this be the case?


Re: ApacheBench says my site is unstable?

Posted by Dirk-Willem van Gulik <di...@covalent.net>.
On FreeBSD; do a

	ulimit -a

to check the number of files you are allowed to have open. For a non
privilidged user the default is tipicallyy set to 64 or some similar low
number.

This is mainly to stop people from getting in each others way. I.e. one
user overloading the machine for some silly benchmark on the middle of a
friday afternoon - while others are trying to make their terms deadline
:-)

	ulimit -n 1024

to get some more (assuming you are allowed). If not contact the admin. See
/etc/login.conf for general limits.

Dw.

On Sun, 28 Oct 2001, Philip Mak wrote:

> I'm using ApacheBench to perform stress testing on my Apache server.
> It's not always working, though. Observe the following two runs: (first is
> Broken pipe; second has some failed requests)
>
> [pmak@sg1 bin]$ ./ab -n 1000 -c 10 http://65.119.108.120:8080/
> This is ApacheBench, Version 1.3c <$Revision: 1.45 $> apache-1.3
> Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
> Copyright (c) 1998-2000 The Apache Group, http://www.apache.org/
>
> Benchmarking 65.119.108.120 (be patient)...Broken pipe
>
> [pmak@sg1 bin]$ ./ab -n 1000 -c 10 http://65.119.108.120:8080/
> This is ApacheBench, Version 1.3c <$Revision: 1.45 $> apache-1.3
> Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
> Copyright (c) 1998-2000 The Apache Group, http://www.apache.org/
>
> Server Software:        Apache/1.3.22
> Server Hostname:        65.119.108.120
> Server Port:            8080
>
> Document Path:          /
> Document Length:        13 bytes
>
> Concurrency Level:      10
> Time taken for tests:   21.109 seconds
> Complete requests:      1000
> Failed requests:        22
>    (Connect: 0, Length: 22, Exceptions: 0)
> Total transferred:      196578 bytes
> HTML transferred:       12714 bytes
> Requests per second:    47.37
> Transfer rate:          9.31 kb/s received
>
> Connnection Times (ms)
>               min   avg   max
> Connect:       99   101   140
> Processing:     5   107   364
> Total:        104   208   504
>
> Whenever I try to load that URL in my browser, it works so I think it has
> something to do with the performance of httpd under load:
>
> [pmak@sg1 bin]$ lynx -dump http://65.119.108.120:8080/
>
>    Hello, world!
>
> Looking in my access_log, I see failed requests like this:
>
> 66.33.60.115 - - [25/Oct/2001:22:20:43 -0700] "GET / HTTP/1.0" 200 0 "-" "ApacheBench/1.3d"
>
> and successful requests like this:
>
> 66.33.60.115 - - [27/Oct/2001:21:31:32 -0700] "GET / HTTP/1.0" 200 13 "-" "ApacheBench/1.3c"
>
> Does anyone have an idea what's going on? I can't figure out why some
> requests seem to return 0 bytes at random, or why ApacheBench crashes with
> "Broken pipe". There is nothing in the VirtualHost or the serverwide error
> log other than the MaxClients warning:
>
> 66.33.60.115 - - [27/Oct/2001:21:31:32 -0700] "GET / HTTP/1.0" 200 13 "-" "ApacheBench/1.3c"
>
> MaxClients is set to 50, btw.
>
> server1# uname -a
> FreeBSD server1.buildreferrals.com 4.2-RELEASE FreeBSD 4.2-RELEASE #0: Fri Oct 12 13:36:14 PDT 2001
> root@test23.tesys.com:/usr/src/sys/compile/LOCAL  i386
>
> Apache version is 1.3.22.
>
> Is there a quirk of FreeBSD that I have to account for, perhaps? This is
> my first time setting up Apache on a FreeBSD system (I've always used Red
> Hat Linux or SunOS before).
>
>
>