You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kenneth Litwak <kl...@apu.edu> on 2005/07/21 18:24:36 UTC
Max thread/session timeouts
We're running an application on Tomcat that often hits the limit of
150 threads. Can someone with experience changing this value give me
advice on it? How big can you make this number? How much extra memory
do I need if I say change it to, say, 500? Thanks.
Ken
Re: Max thread/session timeouts
Posted by "Darryl L. Miles" <da...@netbauds.net>.
Kenneth Litwak wrote:
> We're running an application on Tomcat that often hits the limit of
>150 threads. Can someone with experience changing this value give me
>advice on it? How big can you make this number? How much extra memory
>do I need if I say change it to, say, 500? Thanks.
>
>
I take it you know the 150 is the default limt in the config/server.xml
and this can be upped towards you operating system platform maximum.
A ball park of your applications memory needs @150 threads is better
chcked by simply looking at the paged in size while under that load (the
RSS size in "ps uaxw" under Unix). You can't expect us to guess exactly
how much more memory you need from the information you've given, I mean
you've not told us if you already have 8Gb of RAM installed or just 32Mb
for us to at least take a guess at the answer.
Maybe the Java VM -Xss is a useful option to look at, but I think
providing you are not hitting your upper limit on a single process
memory usage (into the 3/4Gb realm on 32bit) for a high number of
threads then it will make little difference. As I believe stack space
just like other application memory is paged in as its used and reducing
the stack space to a lower limit than your application need will just
make it crash.
--
Darryl L. Miles
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Max thread/session timeouts
Posted by Larry Meadors <la...@gmail.com>.
Whoa! Someone forgot to take their meds today...
To unsubscribe, e-mail:
tomcat-user-unsubscribe@jakarta.apache.org<http://a.apache.org>
Larry
On 7/21/05, Warren Taylor <ww...@sunbeltbusinessbrokersofms.com> wrote:
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
RE: Max thread/session timeouts
Posted by Warren Taylor <ww...@sunbeltbusinessbrokersofms.com>.
Take me off this fucking list.
WARREN TAYLOR
Sunbelt Business Advisors
Sunbelt Business Brokers of MS
www.sunbeltnetwork.com
-----Original Message-----
From: Andrew Miehs [mailto:andrew@2sheds.de]
Sent: Thursday, July 21, 2005 5:00 PM
To: Tomcat Users List
Subject: Re: Max thread/session timeouts
Ouch! Thats a LOT of threads - I can't believe your box still performs
well with this many threads - or have you enabled keep-alives?
The number of threads really depends on your application. I have max
threads set to 750, or our 32bit 2.6 Linux systems. Our thread count
normally doesn't go over 200. When the servers need to wait for the
backend, and the requests start to queue (heading towards 1000) - you
will end up with a huge problem anyway, as it is probably unlikely that
your backend servers/ database, etc, will be able to catch up with the
requests, but as I said, that depends how and what your application does.
Andrew
J. Ryan Earl wrote:
> As a reference, in conf/server.xml I set my thread limit to 10000 max
> threads, 1000 max idle threads, and 100 on startup. I've seen my as
> many as 7K threads busy within my application. This is on a 32bit 2.6
> Linux kernel with 2GB of RAM (-Xmx1500m). On the 2.4 kernel I found
> practical limitations in how many "threads" the kernel could multiplex
> between, saw frequent system hangs under high load where the whole
> server would become unusable.
>
> On either linux kernel, you probably want to increase your maximum
> number of file descriptors in /etc/security/limits.conf for your
> Tomcat user account(s). 16K nofile as default works great for me.
>
> How much more memory you need really depends on your application. 500
> threads isn't that much memory overhead, but if each thread goes off
> and creates a bunch of objects while it's working you'll need to
> assure heapspace is available accordingly. The short answer is: try
> it out, play with it. 500 threads isn't a whole lot.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Max thread/session timeouts
Posted by Andrew Miehs <an...@2sheds.de>.
Ouch! Thats a LOT of threads - I can't believe your box still performs
well with this many threads - or have you enabled keep-alives?
The number of threads really depends on your application. I have max
threads set to 750, or our 32bit 2.6 Linux systems. Our thread count
normally doesn't go over 200. When the servers need to wait for the
backend, and the requests start to queue (heading towards 1000) - you
will end up with a huge problem anyway, as it is probably unlikely that
your backend servers/ database, etc, will be able to catch up with the
requests, but as I said, that depends how and what your application does.
Andrew
J. Ryan Earl wrote:
> As a reference, in conf/server.xml I set my thread limit to 10000 max
> threads, 1000 max idle threads, and 100 on startup. I've seen my as
> many as 7K threads busy within my application. This is on a 32bit 2.6
> Linux kernel with 2GB of RAM (-Xmx1500m). On the 2.4 kernel I found
> practical limitations in how many "threads" the kernel could multiplex
> between, saw frequent system hangs under high load where the whole
> server would become unusable.
>
> On either linux kernel, you probably want to increase your maximum
> number of file descriptors in /etc/security/limits.conf for your
> Tomcat user account(s). 16K nofile as default works great for me.
>
> How much more memory you need really depends on your application. 500
> threads isn't that much memory overhead, but if each thread goes off
> and creates a bunch of objects while it's working you'll need to
> assure heapspace is available accordingly. The short answer is: try
> it out, play with it. 500 threads isn't a whole lot.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Max thread/session timeouts
Posted by "J. Ryan Earl" <ry...@dynaconnections.com>.
As a reference, in conf/server.xml I set my thread limit to 10000 max
threads, 1000 max idle threads, and 100 on startup. I've seen my as
many as 7K threads busy within my application. This is on a 32bit 2.6
Linux kernel with 2GB of RAM (-Xmx1500m). On the 2.4 kernel I found
practical limitations in how many "threads" the kernel could multiplex
between, saw frequent system hangs under high load where the whole
server would become unusable.
On either linux kernel, you probably want to increase your maximum
number of file descriptors in /etc/security/limits.conf for your Tomcat
user account(s). 16K nofile as default works great for me.
How much more memory you need really depends on your application. 500
threads isn't that much memory overhead, but if each thread goes off and
creates a bunch of objects while it's working you'll need to assure
heapspace is available accordingly. The short answer is: try it out,
play with it. 500 threads isn't a whole lot.
-ryan
Kenneth Litwak wrote:
> We're running an application on Tomcat that often hits the limit of
>150 threads. Can someone with experience changing this value give me
>advice on it? How big can you make this number? How much extra memory
>do I need if I say change it to, say, 500? Thanks.
>
>
>
>Ken
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org