Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The suggested MPM prefork configuration on articles for VPS with 1GB RAM is:

<IfModule mpm_prefork_module>
    StartServers          5
    MinSpareServers       5
    MaxSpareServers      10
    MaxClients          150
    MaxRequestsPerChild   0

I know it depends on many factors (which ones exactly ?) but I would like to know how these settings should be for 256M and 512M RAM. Please, provide me configuration examples (as in the table above).

I'm mainly using the VPS for Drupal-based website for local business.


share|improve this question
up vote 2 down vote accepted

What how many processes exist during normal and peak loads for your site. The ammount of memory really isn't that important for the StartServers, MinSpareServers, MaxSpareServers values. The number of users accessing your site, and when matters more. Is your traffic bursty, or do you have a consistent number of people always online.

Memory only really matters as it relates to the MaxClients. Since if you specify a value too high at some point when new processes are created your system is going to start using swap memory. Exactly when that happenes depends heavily based on what you are serving. If you are serving PHP with an app that uses a lot of memory this could mean that you can only have a couple dozen clients before things start to go bad. If you are serving static files you should be able to support many more concurrent users.

share|improve this answer
Ok I see. I've now limited the number of MaxClients and the swapping is reduced (and the website goes faster). Should I completely get rid of the swapping or is it sometimes useful ? How many swapping MBs should I keep ? – Patrick Nov 4 '10 at 20:52
Swapping is helpful if you unintentionality over-commit your memory. If swap is disabled and you run out of memory Linux will start killing of process. Do a search for 'OOM killer' to read about how processes are selected. Swap will keep things from dieing while you order more memory. If your system is frequently using swap under normal load you most likely need to come up with more memory. – Zoredache Nov 4 '10 at 21:31
So, just to understand, I should normally not see swapping unless the server is fed up with the requests. – Patrick Nov 5 '10 at 8:26
One more thing: I've run free -m and I'm currently using 217M of memory and 28M are free. This is the state of my server in stand by (no requests, no traffic). is this too much? What are good values ? thnks – Patrick Nov 5 '10 at 9:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.