Réf. : Re: maxProcessors = max ammout of concurrent connections?
As I know, the maxProcessor value must match the MaxClients value in apache, because each apache process must connect to a processor in Tomcat. ___ NATEXIS ASSET MANAGEMENT Meissa SAKHO 01 58 19 45 71. . . . . . . . . . . . (84571) [EMAIL PROTECTED] Christian Hufgard [EMAIL PROTECTED] 20/02/2004 10:03 Veuillez répondre à Tomcat Users List Pour : Tomcat Users List [EMAIL PROTECTED] cc : Objet : Re: maxProcessors = max ammout of concurrent connections? I have several machines running tomcat now, but I like to get it tuned for higher load. How can I find out the maximum processors I shoudl accept ? Just putting in a high number of course results in very slow processing of request, resulting in people refreshing, results in even more processes, results in even slower replies, results in more refreshers :) Well, think you should not set the max processors to high, that the machine takes longer time to handle the requests. You should define your maximum response time and the figure out, how many request you can process at once in this time. Any idea how to 'tune' the Maximum connectors and the acceptcount. Is it really needed to have an acceptcount ? If the acceptCount is zero, the user will get an message, saying him that the server cannot be reached. If he is in the accepted queue, he will be shown that the server has been contacted and is about to process his request. Christian Is there any document 'out in the wild' describing how to know which values you should use ? I'm just getting to know tomcat but I find it hard to find the right documentation. (many books describe the options in a complete different/confising way). I have several machines running tomcat now, but I like to get it tuned for higher load. How can I find out the maximum processors I shoudl accept ? Just putting in a high number of course results in very slow processing of request, resulting in people refreshing, results in even more processes, results in even slower replies, results in more refreshers :) Any idea how to 'tune' the Maximum connectors and the acceptcount. Is it really needed to have an acceptcount ? Pepijn On Fri, 20 Feb 2004, Christian Hufgard wrote: Why put minProcessors higher then the maximum allowed ? Think this does make no sense and should result in either a constant ammount of processors (the min value, since it cannot fall lower), an error message at startup or some other, unexpected behaviour. Now I set the minProcessors to 30, maxProcessor to 10. What happens is: No error messages in any log. 8 connections after startup of my prog. 9th connection after two seconds 10th connections after nine seconds. Then with each second a new connection is accepted. (Stopped the prog at 20 connections) After restarting 18 connections are established directly, two more after some seconds. 50 seconds after starting the program: Connections are interrupted. Logfile says: INFO: All threads are busy, waiting. Please increase maxThreads or check the servlet status10 10. I'm having trouble finding the exact meaning of some of the parameters myself... but this might be part of a solution for your problem: Why put minProcessors higher then the maximum allowed ? Pepijn Palmans Managing Director Kangaroot Linux Solutions Grote Steenweg 91 2600 Antwerp, Belgium Tel: +32 3/286.17.17 Fax: +32 3/281.23.49 On Fri, 20 Feb 2004, Christian Hufgard wrote: Hi folks, did not found this question answered, neither in the faqs, nor in the archive of this mailing list, nor in bugzilla. Like in the subject described, my question is, wether the attribute maxProcessors in the Connector tag sets the maximum ammount of concurrent connections the CoyeteConnector handles. I tested this on Tomcat up to 4.1.24 with jdk 1.4.2 on debian with kernel 2.4.19, since this is our productive environment. If i set up the connector in server.xml with the following parameters: !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8080 minProcessors=20 maxProcessors=10 enableLookups=true redirectPort=8443 acceptCount=5 debug=0 connectionTimeout=2 useURIValidationHack=false disableUploadTimeout=true / I find a pretty strange behaviour (if maxProcessors should be max Connections): My test programm (jdk 1.4) tries to open up 80 connections to the tomcat and send some continueus requests to a webapps that create some load on the server. The requests use HTTP/1.1 to keep the connection opened and request a page each half second with variing parameters.. I would expect, that 15 connections
Re: Réf. : Re: maxProcessors = max ammout of concurrent connections?
That is not true. This can be only true if you have only one instance of tomcat, and ALL (even static!!!) content is serverd by tomcat. Under normal setup you let your static content be served by apache, and only use tomcat when needed. So you might wanna have more apache processes. Pepijn On Fri, 20 Feb 2004 [EMAIL PROTECTED] wrote: As I know, the maxProcessor value must match the MaxClients value in apache, because each apache process must connect to a processor in Tomcat. ___ NATEXIS ASSET MANAGEMENT Meissa SAKHO 01 58 19 45 71. . . . . . . . . . . . (84571) [EMAIL PROTECTED] Christian Hufgard [EMAIL PROTECTED] 20/02/2004 10:03 Veuillez répondre à Tomcat Users List Pour : Tomcat Users List [EMAIL PROTECTED] cc : Objet : Re: maxProcessors = max ammout of concurrent connections? I have several machines running tomcat now, but I like to get it tuned for higher load. How can I find out the maximum processors I shoudl accept ? Just putting in a high number of course results in very slow processing of request, resulting in people refreshing, results in even more processes, results in even slower replies, results in more refreshers :) Well, think you should not set the max processors to high, that the machine takes longer time to handle the requests. You should define your maximum response time and the figure out, how many request you can process at once in this time. Any idea how to 'tune' the Maximum connectors and the acceptcount. Is it really needed to have an acceptcount ? If the acceptCount is zero, the user will get an message, saying him that the server cannot be reached. If he is in the accepted queue, he will be shown that the server has been contacted and is about to process his request. Christian Is there any document 'out in the wild' describing how to know which values you should use ? I'm just getting to know tomcat but I find it hard to find the right documentation. (many books describe the options in a complete different/confising way). I have several machines running tomcat now, but I like to get it tuned for higher load. How can I find out the maximum processors I shoudl accept ? Just putting in a high number of course results in very slow processing of request, resulting in people refreshing, results in even more processes, results in even slower replies, results in more refreshers :) Any idea how to 'tune' the Maximum connectors and the acceptcount. Is it really needed to have an acceptcount ? Pepijn On Fri, 20 Feb 2004, Christian Hufgard wrote: Why put minProcessors higher then the maximum allowed ? Think this does make no sense and should result in either a constant ammount of processors (the min value, since it cannot fall lower), an error message at startup or some other, unexpected behaviour. Now I set the minProcessors to 30, maxProcessor to 10. What happens is: No error messages in any log. 8 connections after startup of my prog. 9th connection after two seconds 10th connections after nine seconds. Then with each second a new connection is accepted. (Stopped the prog at 20 connections) After restarting 18 connections are established directly, two more after some seconds. 50 seconds after starting the program: Connections are interrupted. Logfile says: INFO: All threads are busy, waiting. Please increase maxThreads or check the servlet status10 10. I'm having trouble finding the exact meaning of some of the parameters myself... but this might be part of a solution for your problem: Why put minProcessors higher then the maximum allowed ? Pepijn Palmans Managing Director Kangaroot Linux Solutions Grote Steenweg 91 2600 Antwerp, Belgium Tel: +32 3/286.17.17 Fax: +32 3/281.23.49 On Fri, 20 Feb 2004, Christian Hufgard wrote: Hi folks, did not found this question answered, neither in the faqs, nor in the archive of this mailing list, nor in bugzilla. Like in the subject described, my question is, wether the attribute maxProcessors in the Connector tag sets the maximum ammount of concurrent connections the CoyeteConnector handles. I tested this on Tomcat up to 4.1.24 with jdk 1.4.2 on debian with kernel 2.4.19, since this is our productive environment. If i set up the connector in server.xml with the following parameters: !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8080 minProcessors=20 maxProcessors=10 enableLookups=true redirectPort=8443 acceptCount=5 debug=0 connectionTimeout=2
Re: Réf. : Re: maxProcessors = max ammout of concurrent connections?
We serve all content via tomcat, so here is no apache involved. The non-static content would be only a fiew images and some css, while nearly everyting else in generated dynamically or has to be proteced via our framework. Christian That is not true. This can be only true if you have only one instance of tomcat, and ALL (even static!!!) content is serverd by tomcat. Under normal setup you let your static content be served by apache, and only use tomcat when needed. So you might wanna have more apache processes. Pepijn On Fri, 20 Feb 2004 [EMAIL PROTECTED] wrote: As I know, the maxProcessor value must match the MaxClients value in apache, because each apache process must connect to a processor in Tomcat. ___ NATEXIS ASSET MANAGEMENT Meissa SAKHO 01 58 19 45 71. . . . . . . . . . . . (84571) [EMAIL PROTECTED] Christian Hufgard [EMAIL PROTECTED] 20/02/2004 10:03 Veuillez répondre à Tomcat Users List Pour : Tomcat Users List [EMAIL PROTECTED] cc : Objet : Re: maxProcessors = max ammout of concurrent connection s? I have several machines running tomcat now, but I like to get it tuned for higher load. How can I find out the maximum processors I shoudl accept ? Just putting in a high number of course results in very slow processing of request, resulting in people refreshing, results in even more processes , results in even slower replies, results in more refreshers :) Well, think you should not set the max processors to high, that the machine takes longer time to handle the requests. You should define your maximum response time and the figure out, how many request you can process at onc e in this time. Any idea how to 'tune' the Maximum connectors and the acceptcount. Is it really needed to have an acceptcount ? If the acceptCount is zero, the user will get an message, saying him that the server cannot be reached. If he is in the accepted queue, he will be shown that the server has been contacted and is about to process his request. Christian Is there any document 'out in the wild' describing how to know which values you should use ? I'm just getting to know tomcat but I find it hard to find the right documentation. (many books describe the options in a complete different/confising way). I have several machines running tomcat now, but I like to get it tuned for higher load. How can I find out the maximum processors I shoudl accept ? Just putting in a high number of course results in very slow processing of request, resulting in people refreshing, results in even more processes , results in even slower replies, results in more refreshers :) Any idea how to 'tune' the Maximum connectors and the acceptcount. Is it really needed to have an acceptcount ? Pepijn On Fri, 20 Feb 2004, Christian Hufgard wrote: Why put minProcessors higher then the maximum allowed ? Think this does make no sense and should result in either a constant ammount of processors (the min value, since it cannot fall lower), an error message at startup or some other, unexpected behaviour. Now I set the minProcessors to 30, maxProcessor to 10. What happens is: No error messages in any log. 8 connections after startup of my prog. 9th connection after two seconds 10th connections after nine seconds. Then with each second a new connection is accepted. (Stopped the prog at 20 connections) After restarting 18 connections are established directly, two more after some seconds. 50 seconds after starting the program: Connections are interrupted. Logfile says: INFO: All threads are busy, waiting. Please increase maxThreads or check the servlet status10 10. I'm having trouble finding the exact meaning of some of the parameters myself... but this might be part of a solution for your problem: Why put minProcessors higher then the maximum allowed ? Pepijn Palmans Managing Director Kangaroot Linux Solutions Grote Steenweg 91 2600 Antwerp, Belgium Tel: +32 3/286.17.17 Fax: +32 3/281.23.49 On Fri, 20 Feb 2004, Christian Hufgard wrote: Hi folks, did not found this question answered, neither in the faqs, nor in the archive of this mailing list, nor in bugzilla. Like in the subject described, my question is, wether the attribute maxProcessors in the Connector tag sets the maximum ammount of concurrent connections the CoyeteConnector handles. I tested this on Tomcat up to 4.1.24 with jdk 1.4.2 on debian wit h kernel 2.4.19, since this is our productive environment. If i set up the connector in
Re: Réf. : Re: maxProcessors = max ammout of concurrent connections?
As far as connections does not mean active connections, what meissa.Sakho wrote is strictly true. Each Apache process connects to Tomcat when (if) it needs to. Call that a connection. Apache processes do not disconnect from Tomcat. Call those idle connections. idle connections = connections = number of Apache processes = MaxClients Of course some of the connections are used at a certain moment. active connections = connections But at any moment in time, an Apache process that is not connected to Tomcat MAY receive a request, and start a connection to Tomcat. So, it is possible (and it actually happens most of the time) that even if your Apache is serving static content, all of the Apache processes are actually connected to Tomcat. This means that connections = MaxClients, with the strict equality being possible. If you have more than one instance of Tomcat, the same thing happens. An Apache process that is connected to one of your Tomcat servers MAY receive a request that has to be processed by your second Tomcat. So it will connect to it, without dropping the connection to the first Tomcat. So maxProcessors = MaxClients is true for any scenario with Apache and Tomcat. Even worse... If you have two Apache and two Tomcat, maxProcessors = sum(MaxClients) for all your Apache servers. Otherwise, busy sites experience hangs. Of course, if you do not use Apache as a frontend, and you simply have a load balancer, you can keep maxProcessors much lower. Yours, Antonio Fiol Pepijn Palmans - Kangaroot wrote: That is not true. This can be only true if you have only one instance of tomcat, and ALL (even static!!!) content is serverd by tomcat. Under normal setup you let your static content be served by apache, and only use tomcat when needed. So you might wanna have more apache processes. Pepijn On Fri, 20 Feb 2004 [EMAIL PROTECTED] wrote: As I know, the maxProcessor value must match the MaxClients value in apache, because each apache process must connect to a processor in Tomcat. ___ NATEXIS ASSET MANAGEMENT Meissa SAKHO 01 58 19 45 71. . . . . . . . . . . . (84571) [EMAIL PROTECTED] smime.p7s Description: S/MIME Cryptographic Signature