-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Pid,

On 4/1/2011 6:43 AM, Pid wrote:
> On 01/04/2011 06:58, Kaushal Shriyan wrote:
>> Hi,
>>
>> What are the implications or issues if maxThreads are increased from the
>> default 150 to 300 threads. Are there any performance issues ?
> 
> Yes, may be at risk of improving performance.

Hah.

Seriously, to the OP: if your webapp under load is not really using the
CPU or network much (that is, you're waiting on some other resource) and
still taking a long time to service requests, then increasing the number
of connections is likely to /slow your webapp down/ because you will be
putting more strain on those already-taxed resources.

On the other hand, if your webapp under load is using a lot of CPU time,
then you will also experience a slowdown because you'll end up with more
context switches to service all those requests PLUS you'll have more
load on the CPU doing actual work.

Finally, increasing the maxThreads will increase your memory
requirements for two reasons: first, you'll need a stack for each thread
to use (see your JVM's default or command-line switches for what that
per-thread memory requirement is) PLUS you'll need the amount of memory
that a typical request (or particularly memory-heavy request, if you
want to be really safe) will use FOR EACH THREAD.

The best thing to do is to load test your webapp and see what point your
webapp stops responding in a reasonable amount of time (to be determined
by your own requirements). If your response time is very fast and your
server is using very little CPU, then you can increase the maxThreads
until things start to become intolerable.

Oh, and if you are using Tomcat behind some web server like Apache
httpd, you might want to make sure that your value for maxThreads
matches whatever configuration you have on the web server so that you
can actually serve that many requests through to Tomcat. ;)

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2V6rAACgkQ9CaO5/Lv0PCNYQCfUQ+KKMvNUbbsgI2jQ8DgfeoF
90EAoMKOwBIwrcsuv8LZsC5sRkXajcj/
=JaTv
-----END PGP SIGNATURE-----

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

Reply via email to