You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mike Crawford <mi...@gmail.com> on 2007/09/24 18:32:16 UTC

Tomcat maxThreads

Hi,

I'd like to know if there are any gotchas from increasing maxThreads well
beyond the standard 150.  For instance, on a new Dell 1950 dual-core with
4GB RAM, why not try 300 or even thousands of threads?  I will be putting
Lighty or Apache in front of Tomcat, which is also a potential bottleneck.

Thanks for your time,

Mike Crawford

Re: Tomcat maxThreads

Posted by Mike Crawford <mi...@gmail.com>.
Thanks Filip,

The link that I pasted below led me to think Comet servlet wouldn't work
when applying the Yale CAS SSO filter that I use.  I'll see how it goes.

Regards,

Mike

On 9/24/07, Filip Hanik - Dev Lists <de...@hanik.com> wrote:
>
> In Tomcat 6 we have the Comet servlet, you would have to use 6.0.x
> trunk, since there is a connection reuse bug in 6.0.14
>
>
> Filip
>
>
> Mike Crawford wrote:
> > Hi Filip,
> >
> > The reason I want to use more threads is because of the nature of our
> AJAX
> > client.  'Sleeping' threads on the server seems like a viable option
> > compared to polling, and therefore I'm wondering how many threads to
> use.
> > Other options include Jetty 6 'Continuation' or equivalents -
> > http://blogs.webtide.com/gregw/2006/07/25/1153845234453.html to handle
> this
> > problem.  I'd prefer to stick with Tomcat if it is scalable with AJAX
> > clients that require a lot of talk between client-server.
> >
> > Regards,
> >
> > Mike
> >
> >
> >
> > On 9/24/07, Filip Hanik - Dev Lists <de...@hanik.com> wrote:
> >
> >> Threads in hundreds, or lower one thousand is ok, if you need more,
> >> question yourself :)
> >> ie, if you need more concurrency, simply turn of keep alives.
> >>
> >> Having too many threads will do the following
> >>
> >> 1. Eat up a good chunk of memory
> >> 2. Your system will spend too much time context switching
> >>
> >> Filip
> >>
> >> Mike Crawford wrote:
> >>
> >>> Hi,
> >>>
> >>> I'd like to know if there are any gotchas from increasing maxThreads
> >>>
> >> well
> >>
> >>> beyond the standard 150.  For instance, on a new Dell 1950 dual-core
> >>>
> >> with
> >>
> >>> 4GB RAM, why not try 300 or even thousands of threads?  I will be
> >>>
> >> putting
> >>
> >>> Lighty or Apache in front of Tomcat, which is also a potential
> >>>
> >> bottleneck.
> >>
> >>> Thanks for your time,
> >>>
> >>> Mike Crawford
> >>>
> >>>
> >>>
> ------------------------------------------------------------------------
> >>>
> >>> No virus found in this incoming message.
> >>> Checked by AVG Free Edition.
> >>> Version: 7.5.488 / Virus Database: 269.13.30/1027 - Release Date:
> >>>
> >> 9/24/2007 11:27 AM
> >>
> >> ---------------------------------------------------------------------
> >> To start a new topic, e-mail: users@tomcat.apache.org
> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >>
> >>
> >
> >
> > ------------------------------------------------------------------------
> >
> > No virus found in this incoming message.
> > Checked by AVG Free Edition.
> > Version: 7.5.488 / Virus Database: 269.13.30/1027 - Release Date:
> 9/24/2007 11:27 AM
> >
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat maxThreads

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
In Tomcat 6 we have the Comet servlet, you would have to use 6.0.x 
trunk, since there is a connection reuse bug in 6.0.14


Filip


Mike Crawford wrote:
> Hi Filip,
>
> The reason I want to use more threads is because of the nature of our AJAX
> client.  'Sleeping' threads on the server seems like a viable option
> compared to polling, and therefore I'm wondering how many threads to use.
> Other options include Jetty 6 'Continuation' or equivalents -
> http://blogs.webtide.com/gregw/2006/07/25/1153845234453.html to handle this
> problem.  I'd prefer to stick with Tomcat if it is scalable with AJAX
> clients that require a lot of talk between client-server.
>
> Regards,
>
> Mike
>
>
>
> On 9/24/07, Filip Hanik - Dev Lists <de...@hanik.com> wrote:
>   
>> Threads in hundreds, or lower one thousand is ok, if you need more,
>> question yourself :)
>> ie, if you need more concurrency, simply turn of keep alives.
>>
>> Having too many threads will do the following
>>
>> 1. Eat up a good chunk of memory
>> 2. Your system will spend too much time context switching
>>
>> Filip
>>
>> Mike Crawford wrote:
>>     
>>> Hi,
>>>
>>> I'd like to know if there are any gotchas from increasing maxThreads
>>>       
>> well
>>     
>>> beyond the standard 150.  For instance, on a new Dell 1950 dual-core
>>>       
>> with
>>     
>>> 4GB RAM, why not try 300 or even thousands of threads?  I will be
>>>       
>> putting
>>     
>>> Lighty or Apache in front of Tomcat, which is also a potential
>>>       
>> bottleneck.
>>     
>>> Thanks for your time,
>>>
>>> Mike Crawford
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> No virus found in this incoming message.
>>> Checked by AVG Free Edition.
>>> Version: 7.5.488 / Virus Database: 269.13.30/1027 - Release Date:
>>>       
>> 9/24/2007 11:27 AM
>>     
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>     
>
>   
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG Free Edition. 
> Version: 7.5.488 / Virus Database: 269.13.30/1027 - Release Date: 9/24/2007 11:27 AM
>   


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


Re: Tomcat maxThreads

Posted by Mike Crawford <mi...@gmail.com>.
Hi Filip,

The reason I want to use more threads is because of the nature of our AJAX
client.  'Sleeping' threads on the server seems like a viable option
compared to polling, and therefore I'm wondering how many threads to use.
Other options include Jetty 6 'Continuation' or equivalents -
http://blogs.webtide.com/gregw/2006/07/25/1153845234453.html to handle this
problem.  I'd prefer to stick with Tomcat if it is scalable with AJAX
clients that require a lot of talk between client-server.

Regards,

Mike



On 9/24/07, Filip Hanik - Dev Lists <de...@hanik.com> wrote:
>
> Threads in hundreds, or lower one thousand is ok, if you need more,
> question yourself :)
> ie, if you need more concurrency, simply turn of keep alives.
>
> Having too many threads will do the following
>
> 1. Eat up a good chunk of memory
> 2. Your system will spend too much time context switching
>
> Filip
>
> Mike Crawford wrote:
> > Hi,
> >
> > I'd like to know if there are any gotchas from increasing maxThreads
> well
> > beyond the standard 150.  For instance, on a new Dell 1950 dual-core
> with
> > 4GB RAM, why not try 300 or even thousands of threads?  I will be
> putting
> > Lighty or Apache in front of Tomcat, which is also a potential
> bottleneck.
> >
> > Thanks for your time,
> >
> > Mike Crawford
> >
> >
> > ------------------------------------------------------------------------
> >
> > No virus found in this incoming message.
> > Checked by AVG Free Edition.
> > Version: 7.5.488 / Virus Database: 269.13.30/1027 - Release Date:
> 9/24/2007 11:27 AM
> >
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat maxThreads

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
Threads in hundreds, or lower one thousand is ok, if you need more, 
question yourself :)
ie, if you need more concurrency, simply turn of keep alives.

Having too many threads will do the following

1. Eat up a good chunk of memory
2. Your system will spend too much time context switching

Filip

Mike Crawford wrote:
> Hi,
>
> I'd like to know if there are any gotchas from increasing maxThreads well
> beyond the standard 150.  For instance, on a new Dell 1950 dual-core with
> 4GB RAM, why not try 300 or even thousands of threads?  I will be putting
> Lighty or Apache in front of Tomcat, which is also a potential bottleneck.
>
> Thanks for your time,
>
> Mike Crawford
>
>   
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG Free Edition. 
> Version: 7.5.488 / Virus Database: 269.13.30/1027 - Release Date: 9/24/2007 11:27 AM
>   


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