Re: slow apache 2.0

2002-04-10 Thread Jacek Prucia

On Tue, 09 Apr 2002 18:43:26 -0700
Brian Pane [EMAIL PROTECTED] wrote:

[...]
 read(10, GET /test.txt HTTP/1.0\r\nUser-Age..., 8000) = 92
 gettimeofday({1018386426, 197988}, NULL) = 0
 gettimeofday({1018386426, 198146}, NULL) = 0
 stat(/iVision/users/i-vision/main/htdocs/test.txt, {st_mode=S_IFREG|0644,
 st_size=13924, ...}) = 0
 open(/iVision/users/i-vision/main/htdocs/test.txt, O_RDONLY) = 11
 open(/etc/localtime, O_RDONLY)= 12
 read(12, TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\n\0\0\0\n\0..., 44) =
 44
 read(12, \230DI\200\233\f%p\233\325\332\360\234\331\256\220\235..., 925) =
 925
 fstat(12, {st_mode=S_IFREG|0644, st_size=1067, ...}) = 0
 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
 = 0x40043000
 read(12, \0\0\0\0\0\0\0\0\16\20\0\4\0\0\34 \1\10\0\0\16\20\0\4\0..., 4096)
 = 98
 close(12)   = 0
 munmap(0x40043000, 4096)= 0
 brk(0x81b7000)  = 0x81b700
 
 
 What's it doing opening /etc/localtime?  Especially in
 between reading the request and sending the response?
 Can anyone tell what module this is from?

AFAIK /etc/localtime points to glibc timezone file ($TZ). When clock is set to GMT, 
but system (through localtime()) needs to know exact local time -- glibc library opens 
that file to get the idea what offset needs to be applied to GMT time to have exact 
local time as a result. This happens with every software on such configured system (i 
just tried strace with /bin/date and /usr/bin/cal just to be sure) -- IMHO nothing to 
worry about in terms of performance.

--
regards,
Jacek Prucia




Re: slow apache 2.0

2002-04-10 Thread Greg Ames

Nick De Decker wrote:
 
 Hello again,
 
 These are my current worker settings (defaults from standard httpd.conf)
 
 StartServers 2
 MaxClients 150
 MinSpareThreads 25
 MaxSpareThreads 75
 ThreadsPerChild 25
 MaxRequestsPerChild  0
 
 = With these settings apache 2.0 kicks ass, but only if concurrent requests
 is lower then 26
 26 = 1000 per second
 27 = 50 per second


Nick,

What happens if you boost ThreadsPerChild way high, like to 1000 or 2000, and
change StartServers to 1?  This should let nearly everything be served by one
process, and will make it a lot harder to fill up worker's connection queue.

Greg



Re: slow apache 2.0

2002-04-10 Thread Bill Stoddard



 Hello,

 Settings now for worker mpm :

 ThreadLimit   1000
 StartServers 1
 Maxclients2000
 MinSpareThreads 25
 MaxSpareThreads 75
 ThreadsPerChild 1000
 MaxRequestsPerChild 0

 = Strange thing is that with these settings a ps aux list a little 1009
 apache processes, so these are no threads but childs ? strange 


This is linux wierdness. They are really threads andnot processes.

 Another thing is that with these settings the performance when load is low
 that response times are higher and requests per seconds is 5 times lower
 then with original settings.

1000 is probably way to large for your test. Under light load, you are still chewing up
lots of RAM and experiencing lots of context switching. The trick is to set
ThreadsPerChild just right.. no greater than you need but large enough to handle the
expected load.

Bill




Re: slow apache 2.0

2002-04-09 Thread Jim Jagielski

Nick De Decker wrote:
 
 Hello,
 
 I'm testing apache 2.0 but i'm having trouble with it.
 Benchmarks show very slow results when the number of concurrent users get
 high.
 i tested the prefork/worker settings but nothing seems to help.
 tested with ab :
 ab -n 1 -c 1000 http://192.168.1.253/index.html (978 bytes page)
 
 apache 1.3.24 = 1036 requests per second, response times of 110 ms
 apache 2.0.35 = 68 requests per second, average response time of 15000 ms.
 
 So why did the make apache 2.0 so slow ?  3 years of work for a server
 that's  100 slower ?
 

Yep, and we're damn proud of it.

Actually, sounds like something is seriously hosed with your
setup... What platform are you running (it's really useful
if you actually provide some useful information like that)

-- 
===
   Jim Jagielski   [|]   [EMAIL PROTECTED]   [|]   http://www.jaguNET.com/
  A society that will trade a little liberty for a little order
 will lose both and deserve neither - T.Jefferson



Re: slow apache 2.0

2002-04-09 Thread Cliff Woolley

On Tue, 9 Apr 2002, Jim Jagielski wrote:

  ab -n 1 -c 1000 http://192.168.1.253/index.html (978 bytes page)
 
  apache 1.3.24 = 1036 requests per second, response times of 110 ms
  apache 2.0.35 = 68 requests per second, average response time of 15000 ms.

 Yep, and we're damn proud of it.

;)

 Actually, sounds like something is seriously hosed with your
 setup... What platform are you running (it's really useful
 if you actually provide some useful information like that)

Definitely.  It would also be really really helpful to know what your MPM
configuration paramters are.  It sounds to me like your 2.0.35
installation is not configured correctly to handle that many concurrent
requests.

--Cliff


--
   Cliff Woolley
   [EMAIL PROTECTED]
   Charlottesville, VA






Re: slow apache 2.0

2002-04-09 Thread William A. Rowe, Jr.

At 09:53 AM 4/9/2002, Jim Jagielski wrote:
Nick De Decker wrote:
 
  I'm testing apache 2.0 but i'm having trouble with it.
  Benchmarks show very slow results when the number of concurrent users get
  high.
  i tested the prefork/worker settings but nothing seems to help.
  tested with ab :
  ab -n 1 -c 1000 http://192.168.1.253/index.html (978 bytes page)
 
  apache 1.3.24 = 1036 requests per second, response times of 110 ms
  apache 2.0.35 = 68 requests per second, average response time of 15000 ms.

Sounds like your 1.3.24 is serving a direct hit to index.html, while 2.0.35 you
are serving multiviews (it's searching through the list of all 
index.html.xx for your
preferred language.)  Is there an index.html (no .xx language extension) in 
both
or neither of the document roots?

Need to be testing apples to apples.  Also look if you have enabled SSI in 2.0
while leaving 1.3 unparsed.




Re: slow apache 2.0

2002-04-09 Thread Aaron Bannert

On Tue, Apr 09, 2002 at 04:47:02PM +0200, Nick De Decker wrote:
 I'm testing apache 2.0 but i'm having trouble with it.
 Benchmarks show very slow results when the number of concurrent users get
 high.
 i tested the prefork/worker settings but nothing seems to help.
 tested with ab :
 ab -n 1 -c 1000 http://192.168.1.253/index.html (978 bytes page)

Ab is not very good for testing concurrency. Check out flood for
somewhat better concurrency (http://httpd.apache.org/test/flood/).

Also, keep in mind that although you'll see better scalability
with the worker MPM over the classic prefork MPM, the biggest
improvement will be in memory requirements. I've run 300+ threads
on my solaris 8 box while only consuming around 20MB.

-aaron



Re: slow apache 2.0

2002-04-09 Thread Austin Gonyou

Have you tried not using su-exec?

On Tue, 2002-04-09 at 11:51, Nick De Decker wrote:
 Hello again,
 
 These are my current worker settings (defaults from standard httpd.conf)
 
 StartServers 2
 MaxClients 150
 MinSpareThreads 25
 MaxSpareThreads 75
 ThreadsPerChild 25
 MaxRequestsPerChild  0
 
 = With these settings apache 2.0 kicks ass, but only if concurrent
 requests
 is lower then 26
 26 = 1000 per second
 27 = 50 per second
 
 I still have to install flood but haven't installed cvs for the moment,
 can
 i find tarballs somewhere ?
 Ab wont be the best benchmark test, but one must admit that the
 performance
 drop between 26 en 27 concurrent connections is horrible.
 
 System : linux 2.4.18 / duron 1000 / 512 mb sdram / udma100 hd
 Apache got compiled with following settings :
 
 ./configure \
 --enable-layout=Apache \
 --enable-so \
 --with-mpm=worker \
 --enable-ssl \
 --with-ssl=/usr/include/openssl \
 --enable-mime-magic \
 --enable-expires \
 --enable-headers \
 --enable-usertrack \
 --enable-http \
 --enable-dav \
 --enable-info \
 --enable-rewrite \
 --enable-speling \
 --enable-auth-anon \
 --enable-cgi \
 --enable-cgid \
 --enable-suexec \
 --with-suexec-caller=apache \
 --with-suexec-docroot=/iVision/users \
 --with-suexec-uidmin=1000 \
 --with-suexec-gidmin=1000 \
 --with-suexec-safepath=/usr/bin:/bin:/iVision/bin:/usr/local/bin
 
 
 Nick
 
 - Original Message -
 From: Aaron Bannert [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, April 09, 2002 5:18 PM
 Subject: Re: slow apache 2.0
 
 
  On Tue, Apr 09, 2002 at 04:47:02PM +0200, Nick De Decker wrote:
   I'm testing apache 2.0 but i'm having trouble with it.
   Benchmarks show very slow results when the number of concurrent
 users
 get
   high.
   i tested the prefork/worker settings but nothing seems to help.
   tested with ab :
   ab -n 1 -c 1000 http://192.168.1.253/index.html (978 bytes page)
 
  Ab is not very good for testing concurrency. Check out flood for
  somewhat better concurrency (http://httpd.apache.org/test/flood/).
 
  Also, keep in mind that although you'll see better scalability
  with the worker MPM over the classic prefork MPM, the biggest
  improvement will be in memory requirements. I've run 300+ threads
  on my solaris 8 box while only consuming around 20MB.
 
  -aaron
 
 
-- 
Austin Gonyou
Systems Architect, CCNA
Coremetrics, Inc.
Phone: 512-698-7250
email: [EMAIL PROTECTED]

It is the part of a good shepherd to shear his flock, not to skin it.
Latin Proverb



signature.asc
Description: This is a digitally signed message part


Re: slow apache 2.0

2002-04-09 Thread Brian Pane

Nick De Decker wrote:

Hello again,

These are my current worker settings (defaults from standard httpd.conf)

StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild  0

= With these settings apache 2.0 kicks ass, but only if concurrent requests
is lower then 26
26 = 1000 per second
27 = 50 per second

I still have to install flood but haven't installed cvs for the moment, can
i find tarballs somewhere ?
Ab wont be the best benchmark test, but one must admit that the performance
drop between 26 en 27 concurrent connections is horrible.


I've managed to recreate this scenario with the worker MPM on Linux.
By instrumenting the worker code, one thing I've found is that sometimes
the file descriptor queue in a child process can become full (causing the
listener to block, and the just-accepted connection to sit in limbo for
a while) in conditions where the server as a whole (across all child
processes) has plenty of idle threads.

--Brian






Re: slow apache 2.0

2002-04-09 Thread Nick De Decker
]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 09, 2002 6:37 PM
Subject: Re: slow apache 2.0


 Nick De Decker wrote:

 Hello again,
 
 I was just getting frustrated after days of testing.
 
 Hardware : Amd duron 1000, 512 mb scdram (133 mhz) udma100 disk.
 Running trustix secure linux 1.5. kernel 2.4.18 (however tests are the
same
 with 2.2 kernels and 2.4.17)
 
 Yesterday i tested with mpm=worker settings:
 I've used default worker settings, then changed each and overy one of
them
 but the problem remains : when the number of concurrent users exceeds
 (ThreadsPerChild +1) the number of requests per second drops drastically.
 (when concurrent users  ThreadsPerChild i get 1000 requests per second,
if
 higher only 50 requests :(
 

 If you're willing to do some more data collection, the
 next step that I recommend is to collect a system call
 trace for oth 1.3 and 2.0 (with the prefork MPM for the
 latter):

 strace -o [output file] -p [pid of one httpd child process]

 and run ab -n1 -c1 [your test URL] and post the output for
 1.3 and 2.0.

 Thanks,
 --Brian