You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Nick <ni...@finiteautomata.com> on 2004/06/08 17:19:17 UTC

[users@httpd] Worker MPM tweaks help

Hello, I am trying to tune my Apache worker MPM settings.  I posted a question last month about performance tuning and got some great feedback but I am still trying to get my settings fine tuned.  I ran some ab tests from another server while modifying my settings.  The best results I got were from the following settings
StartServers         2
MaxClients         720
MinSpareThreads     64
MaxSpareThreads    160
ThreadsPerChild     48
MaxRequestsPerChild  0

My machine is a dedicated webserver that hosts 30 or 40 vhosts.  I has 2gb of RAM and the average httpd process takes up about 8mbs.  I have 8 of these servers behind a Cisco Content Server Switch which load balances the servers.  Using these settings I see on the CSS that on average there are 265 connections to each box at any given time.  Are my settings appropriate?  I am not sure why these gave me the best results with multiple ab tests. 

Our servers do occasionally have higher loads but on average these connections are the norm.  How can I determine a good guess at how many connections I can have to the box before it chokes?  I thought that if I have 1700 megs of available RAM and the average process is 8 mbs then MaxClients should be something like 212 or 200 not higher.  I have read the docs on this a few times and the O'Reilly Apache Cookbook but am still confused.  Does MaxClients refer to the Maximum number of connections that can be handled by my box or does it mean the maximum number of connections that can be handled by each process?  

If needed will Apache continue to spawn as many processes as it needs til you run out of memory?

Thanks and sorry for all the questions,
Nick


---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Worker MPM tweaks help

Posted by Joshua Slive <jo...@slive.ca>.
On Tue, 8 Jun 2004, Nick wrote:
> Our servers do occasionally have higher loads but on average these 
> connections are the norm.  How can I determine a good guess at how many 
> connections I can have to the box before it chokes?  I thought that if I 
> have 1700 megs of available RAM and the average process is 8 mbs then 
> MaxClients should be something like 212 or 200 not higher.  I have read 
> the docs on this a few times and the O'Reilly Apache Cookbook but am 
> still confused.  Does MaxClients refer to the Maximum number of 
> connections that can be handled by my box or does it mean the maximum 
> number of connections that can be handled by each process?

MaxClients is the total number of connections that can be handled in all 
processes.

>If needed will Apache continue to spawn as many processes as it needs til 
> you run out of memory?

No, it will only not spawn any more processes if [number of 
processes]*ThreadsPerChild > MaxClients.

And you certainly don't want apache spawning processes until it runs out 
of memory.  You want to set MaxClients so that never happens.  Because any 
web server that is actively using swap space will slow to a crawl.

Joshua.


---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org