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 have a vps running 512mb of ram and 1 vCPU, what would be the optimal amount of MaxClients (apache workers) I should run in order to get the most efficient serving of a website? Currently it's only hosting a very basic Wordpress installation.

share|improve this question
    
As many as will fit in RAM without swapping out. –  Michael Hampton Dec 4 '12 at 20:37
1  
This depends on which MPM you are using and how much RAM each of your children/threads uses. It also depends on what else is running on the server (such as a database) and how much RAM the other things use. Could you add that information to the question? –  Ladadadada Dec 4 '12 at 20:37

1 Answer 1

Find average memory of apache process divide it with your RAM allocated for apache.

Since you have 512 Mb RAM,allocate 256-300 Mb for apache and rest for normal operation(if this is dedicated for webserver and no other services are running).

Let say if your average process size is 5Mb then u can have upto 51 max clients(255/5).

Dont over allocate maxclient value it can lead to swapping.

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.