Re: [users@httpd] Tracing the cork..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 08, 2005 at 04:13:23PM +0800, JM wrote:
> Hi,
> 
> 	below is the result of server status... i was wondering if there is something 
> i can do to speed up request on our website.

[snip]
> 
> CPU Usage: u1724.2 s203.81 cu6.76 cs33.41 - 27.3% CPU load
> 26.6 requests/sec - 147.8 kB/second - 5.6 kB/request
> 256 requests currently being processed, 0 idle servers

  ^^^ well, that just screams "you're out of httpd children". You've got
  a few options:
  
    * If your app is slow, poke your developers. If it's hitting a
    database for every request, see if it actually has to

    * If your content is all (or primarily) static, you've just got tons of traffic
    coming in. You can add another server to your rotation, effectively
    doubling your capacity, place a light-weight server (such as Tux) in
    front of Apache, or a Squid instance in front of Apache

    * Looks like you still have CPU to spare, so as long as you're not close to 
    maxing out your memory, you can crank up your MaxClients directive. Note that 
    the default compile-time hard limit on Unix is 256, so if you need to increase it, 
    you'll need to recompile apache with something like:

        -DHARD_SERVER_LIMIT=1024

	Added to your compiler flags (or, you can always tweak include/httpd.h
	manually, if you prefer). Once that's set to 1024, you can increase
	MaxClients to, say, 384 as a starting point and see where that gets
	you. Be advised that by running a large number of children, you run
	the risk of running out of memory. Do the math: if
	memory-per-httpd-process * # httpd processes >= RAM on system, you'll
	likely have issues. I've had great success placing a lightweight
    server (Tux, in my case) in front of apache to handle the static
    content (images and the like). Of course, this may require you to
    patch and recompile your kernel.

    My, that's a lot of typing for this hour. =)

--n

-- 
<huey> dd of=/dev/fd0 if=/dev/flippy bs=1024
<huey> ^^^ Making Flippy Floppy


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux