Hi,

I'm actually working on a production platform to make some benchmarks and there 
is an important latency mainly because of sockets renewal.

The platform is set up with 4 front servers hosting 1 apache process and 24 
middle servers hosting 4 tomcat instances.
Thus there is 4 apaches and 96 tomcat workers in the mod_jk worker 
configuration file.

The previous apache non working configuration was:

<IfModule worker.c>
StartServers        5
MaxClients          8192
ServerLimit         137
MinSpareThreads     25
MaxSpareThreads     60
ThreadsPerChild     60
MaxRequestsPerChild 1000
</IfModule>


I found an apache MPM worker configuration which has successfully passed the 
benchmarks:

<IfModule worker.c>
StartServers        16
MaxClients          8192
ServerLimit         34
MinSpareThreads     25
MaxSpareThreads     150
ThreadsPerChild     256
MaxRequestsPerChild 0
</IfModule>


Reading the tomcat worker documentation, I saw that the connection_pool_size 
parameter is equal to ThreadsPerChild by default.
This defines the number of connections made to the AJP backend that are 
maintained as a connection pool. It will limit the number of those connection 
that each web server child process can made.

So I first conclude that:
1 Apache Child process = 1 mod_jk connection pool shared between N threads
and connection_pool_size = N where N is the value of ThreadsPerChild apache 
parameter

Thus in the example above we could have maximum 34 mod_jk connection pools (1 
per Apache child) and connection_pool_size = 256 -> 8704 connections


But I found the configuration site below:

http://lbconfig.appspot.com/?lb=mod_jk&v=1.2.27%20or%20less&nca=4&ncj=4&nai=4&nji=24&njips=4&f=true&c=false&lr=false&lrl=&mpm=Worker

which explain us that there is a connection_pool_size for each worker.
Thus 1 Apache Child process can handle X threads and indirectly Y workers so 
there is Y mod_jk connection pools per apache child and connection_pool_size = 
X.

Thus in the example above we could have maximum 34 (ServerLimit) * 96 (tomcat 
workers) mod_jk connection pools and connection_pool_size = 256 -> 835584 
connections

Does anyone can elucidate that question?
Apache ThreadPerChild parameter should be superior or equal to the number of 
mod_jk tomcat workers?

Thanks for help,

David Ramblewski



Ce message et les pièces jointes sont confidentiels et réservés à l'usage 
exclusif de ses destinataires. Il peut également être protégé par le secret 
professionnel. Si vous recevez ce message par erreur, merci d'en avertir 
immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant 
être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra 
être recherchée quant au contenu de ce message. Bien que les meilleurs efforts 
soient faits pour maintenir cette transmission exempte de tout virus, 
l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne 
saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for 
the addressee; it may also be privileged. If you receive this e-mail in error, 
please notify the sender immediately and destroy it. As its integrity cannot be 
secured on the Internet, the Atos Origin group liability cannot be triggered 
for the message content. Although the sender endeavours to maintain a computer 
virus-free network, the sender does not warrant that this transmission is 
virus-free and will not be liable for any damages resulting from any virus 
transmitted.


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

Reply via email to