[users@httpd] Slow response times under load, suggestions?

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

 



Hello. I'm not 100% sure I have the best config options for a server I
look after. The site is a very popular (non-commerical) site that
serves a lot of small files every day. The problem is, at certain
times throughout the day there are some traffic spikes and the server
goes into slow-motion for a while.

Here are a few 'top' read-outs (run in batch mode, so no CPU line):

last pid: 85976;  load averages: 177.71, 43.33, 28.51  up 31+14:57:29 
  07:50:07
1052 processes:2 running, 1050 sleeping
Mem: 632M Active, 80M Inact, 254M Wired, 34M Cache, 112M Buf, 1664K Free
Swap: 2048M Total, 717M Used, 1331M Free, 35% Inuse

last pid: 86023;  load averages: 208.72, 91.06, 49.44  up 31+15:02:40 
  07:55:18
1055 processes:3 running, 1052 sleeping
Mem: 635M Active, 78M Inact, 253M Wired, 22M Cache, 112M Buf, 13M Free
Swap: 2048M Total, 716M Used, 1332M Free, 34% Inuse

last pid: 86366;  load averages:  4.10, 26.05, 37.24  up 31+15:17:30    08:10:08
1057 processes:3 running, 1054 sleeping
Mem: 638M Active, 69M Inact, 256M Wired, 36M Cache, 112M Buf, 2468K Free
Swap: 2048M Total, 678M Used, 1370M Free, 33% Inuse

last pid: 86459;  load averages:  4.99, 13.67, 28.26  up 31+15:22:22    08:15:00
1060 processes:5 running, 1055 sleeping
Mem: 646M Active, 63M Inact, 257M Wired, 33M Cache, 112M Buf, 1688K Free
Swap: 2048M Total, 686M Used, 1362M Free, 33% Inuse

And here is some of the httpd.conf (that I think it is important)
<IfModule prefork.c>
StartServers    10
MinSpareServers 10
MaxSpareServers 30
ServerLimit             1024
MaxClients              1024
MaxRequestsPerChild  0
</IfModule>

The server is FreeBSD 4.11 and apache-2.0.53. This is why prefork is being used.

My understading (which may be wrong) is that the server is running out
of free processors, therefore queuing requests, which is why the
server is very slow to respond. Apache has 1024 allowed, and has
simply run out processors. The high CPU usage is a side-effect of
this.

My questions are, why are the sleepers not being dropped quicker, or
being re-used?

Should the MinSpareServer or MaxSpareServers (or both) be increased? 

Should the ServerLimit (and MaxClients) be increased, to handle the
load or decreased, as it appears a chunk of swap is being used?

Should the MaxRequestsPerChild be given a value, to help drop the
sleeping processors quicker?

Is it simply the hardware can not handle the load?

Thanks heaps for any advice!

---------------------------------------------------------------------
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