Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

So I just got a nice new VPS service. I was wondering what a good number of 'MaxClients' would be, for a server that will host a personal website, some blogs, etc, and your experiences with one server maxclients stuff! The default of Ubu server is 150.

share|improve this question

3 Answers 3

up vote 2 down vote accepted

How long is a piece of string? :)

For the most part the limiting factor is going to be memory. Particularly if you are using apache and have a lot of modules installed (mod_php, mod_perl etc); Some of the factors which are going to determine the maximum number of concurrent connections that you can service will include:

  • Amount of RAM in the machine
  • Amount of RAM required to service each http request
  • What else is running on the machine?
  • Nature of the requests and the content being served

For the most part, 150 is considered a reasonable number. My recommendation would be to leave it as is. If it ain't broke, why try fix it?

If you do find that your hitting MaxClients consistently then you have a problem which needs addressing.

I know the answer is a bit vague but there is no real firm figure that can be provided without more knowledge of the environment

share|improve this answer
    
Sweet - thanks! It's a 512mib VPS. I don't see myself hitting it, but If 150 is mostly reasonaible I'll stick with it =D –  Kyle Apr 1 '10 at 21:45

The rough rule is MaxClients = approximate RAM available to Apache ÷ average RAM per Apache process. 150 would probably be way more than your average 256MB VPS slice can handle.

share|improve this answer

Assuming it's apache prefork...

Look at the output of "top" on the system and pay attention to the RSS size of the apache processes. Lets say it's 30M. Then, 512MB RAM / Apache RSS size... suggests a MaxClient setting of around 17.

If you have over 17 apache processes running your machine will start using swap space for sure... once starting to use swap it can get out of control quickly if it's a busy server.

However, as it's probably not a busy webserver (you've gone for VPS and it's a personal website) the MaxClient setting is probably on the most part irrelevant as you probably won't be getting many concurrent connections.

share|improve this answer

Your Answer

 
discard

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.