On 16/11/2011 16:52, Christopher Schultz wrote:
> Pid,
> 
> On 11/16/11 8:47 AM, Pid * wrote:
>> Tomcat 6.0.32, HTTPD (worker mpm) 2.2.19, mod_jk 1.2.31.
> 
>> If ThreadsPerChild is 60 and ServerLimit is 10, MaxClients is 600,
>> how many connections, at peak, will be made to 20 Tomcat
>> instances?
> 
> - From httpd docs:
> 
> MaxClients: For threaded and hybrid servers (e.g. beos or worker)
> MaxClients restricts the total number of threads that will be
> available to serve clients. The default value for beos is 50. For
> hybrid MPMs the default value is 16 (ServerLimit) multiplied by the
> value of 25 (ThreadsPerChild). Therefore, to increase MaxClients to a
> value that requires more than 16 processes, you must also raise
> ServerLimit.
> 
> ServerLimit: With worker use this directive only if your MaxClients
> and ThreadsPerChild settings require more than 16 server processes
> (default). Do not set the value of this directive any higher than the
> number of server processes required by what you may want for
> MaxClients and ThreadsPerChild.
> 
> So if MaxClients is 600 and ThreadsPerChild is 60 then you can't have
> more than 10 processes each with 60 threads. If you want more than 16
> server processes (which it looks like you don't need), then you'll
> need to set ServerLimit to something higher than it's default for
> worker which appears to be 16.
> 
> I'm not sure you need ServerLimit at all.
> 
> If you have 20 TCs on the back end, then mod_jk will have to open 20 *
> 600 = 12000 connections at peak, if my math is correct. That's only
> 600 connections per TC, or course, but you may have trouble with
> creating that many connections from the proxy.

What I'm not clear on is whether the mod_jk worker connection_pool_size
is 60 per Server child, or 60 * 10 Server children.

If MaxClients is still 600 and there is one Tomcat, one might assume
that allowing all 600 to go to that Tomcat is  sensible - but if there
are two Tomcats, what is the behaviour?  NB 600 to each Tomcat would be
more than MaxClients.

> If you have more than one worker, then the number of Tomcat instances
> is essentially multiplied. So, if you have 20 TC backends each with 2
> workers assigned to them, then you'll 24000 connections instead.
> 
>> Will this change If Tomcat instances start failing?
> 
> Probably not -- mod_jk will just retire the connection and create a
> new one. If you are having load problems, you might make things worse
> with all this connection churn.

Agreed.


p

> -chris
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

-- 

[key:62590808]

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to