Page is a not externally linkable
- Hardware and OS Related Technologies
-- Linux, Unix, and *nix like Operating Systems
---- VPS memory allocation


bkeep - 10:32 am on Nov 12, 2009 (gmt 0)


Has this issue been sorted? I would be curious to find out what other things are running, users cron scripts, some mail script choking out the server, backups? 500,000 pages per month seems pretty low volume so unless you get all those in a span of ten minutes I wouldn't think that to be the cause.

I am no Apache guru. I run a small server as well and what I have found regarding general info related to Apache optimization.

MaxClients - Total number of concurrent connections.
Locate it in the configuration file. This should be set to a reasonable value. I suggest using this formula to determine the right value for your server. So for example if you have 2 GB or RAM set this value to 300.
There is no reason for you to set it any higher unless you have a specific problem with this value. A high value can lead to a complete server hang in case of a DOS attack. A value too low can create timeout problems for your clients if the limit is reached.

baseline to start it is usually recommended MaxClients = 150 x RAM (GB) so in your case 150*.25 so around 35

MinSpareServers and MaxSpareServers - MaxSpareServers and MinSpareServers control how many spare (unused) child-processes Apache will keep alive while waiting for more requests to put them to use. Each child-process consumes resources, so having MaxSpareServers set too high can cause resource problems. On the other hand, if the number of unused servers drops below MinSpareServers, Apache will fork (an expensive operation) new child-processes until MinSpareServers is satisfied.

Leave those values to:

MinSpareServers 5
MaxSpareServers 10

My config is a little different since I run a cpanel server but I would also look into the other things that may be running. Spamassasin can suck up memory too not leaving any for Apache or anything else. What kind of loads do you get when you are running out of memory? One last question what shows up in the error log?

[httpd.apache.org...]


Thread source:: http://www.webmasterworld.com/linux/4018895.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com