You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Iratxe Etxeberria Sainz-Ezquerra <ir...@eroski.es> on 2006/04/04 12:47:33 UTC

about maxProcessors attribute






Hi!
I am reviewing my apache-tomcat configuraction, trying to tunning the performance.
I use AJP/1.3 connector between apache and tomcat 5.0.28.
I have the default value for maxProcessors attibute (20). In apache I have maxclients to 150 value. Does someone know how works it exactly? One processors by each request from apache to tomcat, I suposse..
Is there any way to know how many processors are running in the machine? Thanks in advance
 Iratxe



-------------------------------------------------
Iratxe Etxebarria Sainz-Ezkerra
Soporte Web
External Global Services
Tfno: 946 584 773 / 628 717 375





-----

- Este mensaje y los documentos que, en su caso, lleve anexos, pueden contener informacion confidencial. Por ello, se informa a quien lo reciba por error que la informacion contenida en el mismo es reservada y su uso no autorizado esta prohibido legalmente, por lo que en tal caso le rogamos que nos lo comunique por la misma via , se abstenga de realizar copias del mensaje o remitirlo o entregarlo a otra persona y proceda a borrarlo de inmediato.

- Mezu honek eta erantsita dituen agiriek (baldin baditu) isilpeko informazioa izan dezakete. Hori dela eta, hutsegite baten ondorioz jasotzen duenak jakin beza bertan dagoen informazioa ezkutukoa dela eta legeak galarazi egiten duela berori baimenik gabe erabiltzea.

- Aquest missatge i els documents que, donat el cas, portin annexes, poden contenir informacio confidencial. Per aquest motiu, se n'informa a qui el rebi per error que la informacio continguda es reservada i que el seu us no esta legalment autoritzat.

- Esta mensaxe e os documentos que, no seu caso, leven anexos, poden conter informacion confidencial. Por isto, informase a quen o reciba por erro que a informacion contida no mesmo e reservada e o seu uso non autorizado. Esta prohibido legalmente.

- This message together with any documents attached may contain confidential information. You are informed that if you should receive it by mistake, the information it contains is reserved and its use is not authorised. It is legally prohibited. If you have received this message by mistake, please let us know as soon as possible by e-mail. Do not make any copies of the message, nor send it or give it to anybody else. Please delete it right away.

Re: about maxProcessors attribute

Posted by Rajeev Jha <jh...@gmail.com>.
I may be missing something here, but for my AJP13 connection, the number 
of simultaneous requests looks not dependent on maxProcessors attribute 
rather on the MaxThreads.

Here is the relevant snippet from my server.xml
A)
 <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009"
        enableLookups="false"
        minProcessors="2" maxProcessors="4"
         maxThreads="1024" minSpareThreads="25" maxSpareThreads="75"
        redirectPort="8443" protocol="AJP/1.3" />
B)
And here is relevant apache config (worker MPM)

<IfModule worker.c>
ServerLimit         16
ThreadLimit         1000
StartServers         2
MaxClients          4800
MinSpareThreads     25
MaxSpareThreads     75
ThreadsPerChild     300
MaxRequestsPerChild  0
</IfModule>
C)
Then i start a program spawning 1000 threads to connect to a servlet 
that holds the connection for 1 minute.
(Let me know if you want it ;o)
D)
Here is what the manager status shows

Max threads: 1024 Min spare threads: 25 Max spare threads: 75 Current 
thread count: 1024 Current thread busy: 1001
number of established sockets is
[rajeevj01@bdc31035e async]$  netstat -a -n|grep -E "^(tcp)"| cut -c 68- 
| grep ESTABLISHED | wc -l
3656
E) when i change the maxThreads to  124 this is what i get from manager 
status
Max threads: 124 Min spare threads: 25 Max spare threads: 75 Current 
thread count: 124 Current thread busy: 124
so the simultaneous connections stops at 124 and rest of the requests 
are just queued.
and for established sockets
[rajeevj01@bdc31035e async]$  netstat -a -n|grep -E "^(tcp)"| cut -c 68- 
| grep ESTABLISHED | wc -l
2228

F) conclusion ? am i missing something ?

Thanks

Rajeev Jha.

Bill Barker wrote:

>Since MaxClients is so big, I'm assuming that you have a pre-fork MPM 
>Apache.
>
>In this case, you are strongly recommended to have maxProcessors >= 
>MaxClients, since each client will have it's own connection to a processor. 
>If you include something like connectionTimeout="60000", then the Tomcat 
>processors will eventually die off if the Apache child doesn't get any 
>requests for awhile.  Mostly useful if you are running an older Linux 
>kernal.
>
>I think that the /manager/status Servlet for 5.0.x includes this 
>information.  However, since it's at most the number of Apache children, you 
>should be able to approximate it via:
>  $ ps -ef | grep httpd | wc -l
>
>
>
>"Iratxe Etxeberria Sainz-Ezquerra" <ir...@eroski.es> wrote in 
>message news:s4326d74.078@gtinet.eroski.es...
>
>
>
>
>
>
>Hi!
>I am reviewing my apache-tomcat configuraction, trying to tunning the 
>performance.
>I use AJP/1.3 connector between apache and tomcat 5.0.28.
>I have the default value for maxProcessors attibute (20). In apache I have 
>maxclients to 150 value. Does someone know how works it exactly? One 
>processors by each request from apache to tomcat, I suposse..
>Is there any way to know how many processors are running in the machine? 
>Thanks in advance
> Iratxe
>
>
>
>-------------------------------------------------
>Iratxe Etxebarria Sainz-Ezkerra
>Soporte Web
>External Global Services
>Tfno: 946 584 773 / 628 717 375
>
>
>
>
>
>-----
>
>- Este mensaje y los documentos que, en su caso, lleve anexos, pueden 
>contener informacion confidencial. Por ello, se informa a quien lo reciba 
>por error que la informacion contenida en el mismo es reservada y su uso no 
>autorizado esta prohibido legalmente, por lo que en tal caso le rogamos que 
>nos lo comunique por la misma via , se abstenga de realizar copias del 
>mensaje o remitirlo o entregarlo a otra persona y proceda a borrarlo de 
>inmediato.
>
>- Mezu honek eta erantsita dituen agiriek (baldin baditu) isilpeko 
>informazioa izan dezakete. Hori dela eta, hutsegite baten ondorioz jasotzen 
>duenak jakin beza bertan dagoen informazioa ezkutukoa dela eta legeak 
>galarazi egiten duela berori baimenik gabe erabiltzea.
>
>- Aquest missatge i els documents que, donat el cas, portin annexes, poden 
>contenir informacio confidencial. Per aquest motiu, se n'informa a qui el 
>rebi per error que la informacio continguda es reservada i que el seu us no 
>esta legalment autoritzat.
>
>- Esta mensaxe e os documentos que, no seu caso, leven anexos, poden conter 
>informacion confidencial. Por isto, informase a quen o reciba por erro que a 
>informacion contida no mesmo e reservada e o seu uso non autorizado. Esta 
>prohibido legalmente.
>
>- This message together with any documents attached may contain confidential 
>information. You are informed that if you should receive it by mistake, the 
>information it contains is reserved and its use is not authorised. It is 
>legally prohibited. If you have received this message by mistake, please let 
>us know as soon as possible by e-mail. Do not make any copies of the 
>message, nor send it or give it to anybody else. Please delete it right 
>away. 
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>  
>


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


Re: about maxProcessors attribute

Posted by Bill Barker <wb...@wilshire.com>.
Since MaxClients is so big, I'm assuming that you have a pre-fork MPM 
Apache.

In this case, you are strongly recommended to have maxProcessors >= 
MaxClients, since each client will have it's own connection to a processor. 
If you include something like connectionTimeout="60000", then the Tomcat 
processors will eventually die off if the Apache child doesn't get any 
requests for awhile.  Mostly useful if you are running an older Linux 
kernal.

I think that the /manager/status Servlet for 5.0.x includes this 
information.  However, since it's at most the number of Apache children, you 
should be able to approximate it via:
  $ ps -ef | grep httpd | wc -l



"Iratxe Etxeberria Sainz-Ezquerra" <ir...@eroski.es> wrote in 
message news:s4326d74.078@gtinet.eroski.es...






Hi!
I am reviewing my apache-tomcat configuraction, trying to tunning the 
performance.
I use AJP/1.3 connector between apache and tomcat 5.0.28.
I have the default value for maxProcessors attibute (20). In apache I have 
maxclients to 150 value. Does someone know how works it exactly? One 
processors by each request from apache to tomcat, I suposse..
Is there any way to know how many processors are running in the machine? 
Thanks in advance
 Iratxe



-------------------------------------------------
Iratxe Etxebarria Sainz-Ezkerra
Soporte Web
External Global Services
Tfno: 946 584 773 / 628 717 375





-----

- Este mensaje y los documentos que, en su caso, lleve anexos, pueden 
contener informacion confidencial. Por ello, se informa a quien lo reciba 
por error que la informacion contenida en el mismo es reservada y su uso no 
autorizado esta prohibido legalmente, por lo que en tal caso le rogamos que 
nos lo comunique por la misma via , se abstenga de realizar copias del 
mensaje o remitirlo o entregarlo a otra persona y proceda a borrarlo de 
inmediato.

- Mezu honek eta erantsita dituen agiriek (baldin baditu) isilpeko 
informazioa izan dezakete. Hori dela eta, hutsegite baten ondorioz jasotzen 
duenak jakin beza bertan dagoen informazioa ezkutukoa dela eta legeak 
galarazi egiten duela berori baimenik gabe erabiltzea.

- Aquest missatge i els documents que, donat el cas, portin annexes, poden 
contenir informacio confidencial. Per aquest motiu, se n'informa a qui el 
rebi per error que la informacio continguda es reservada i que el seu us no 
esta legalment autoritzat.

- Esta mensaxe e os documentos que, no seu caso, leven anexos, poden conter 
informacion confidencial. Por isto, informase a quen o reciba por erro que a 
informacion contida no mesmo e reservada e o seu uso non autorizado. Esta 
prohibido legalmente.

- This message together with any documents attached may contain confidential 
information. You are informed that if you should receive it by mistake, the 
information it contains is reserved and its use is not authorised. It is 
legally prohibited. If you have received this message by mistake, please let 
us know as soon as possible by e-mail. Do not make any copies of the 
message, nor send it or give it to anybody else. Please delete it right 
away. 




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