Re: maxThreads

2011-04-01 Thread Christopher Schultz
-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



Re: maxThreads

2011-04-01 Thread Pid
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.


p

> I am using TC 5.5.27 , Ubuntu Linux Server 8.04 , Sun Java 1.6.0 Update 24
> 
> Please suggest/guide.
> 
> Thanks and Regards,
> 
> Kaushal
> 




signature.asc
Description: OpenPGP digital signature


Re: MaxThreads <-> max. users ?

2008-04-30 Thread Alan Chaney

Like most things in complex network apps there is no simple answer.

MaxThreads refers to the number of simultaneous open HTTP network 
connections there can be. A connection is opened to enable the HTTP 
request response cycle (request from browser -> server, response from 
server-> browsers). This does not exactly translate into users because 
depending upon the page it is possible for the browser to make multiple 
simultaneous requests (images, text, javascript, css etc) for the same 
browser page.


'Sessions' in web server parlance refers to the ability whereby the 
server can track the state of a 'user conversation' which may spread 
across many pages. The identification of the user must be saved 
throughout this session if there are authentication issues involved - 
private pages, secure forms etc.


There is no direct relationship between the number of sessions and the 
number of active, open connections.


When estimating the capacity of a server you must work out the average 
page response time and then that will give you the number of users/hour.


The only real way that you can really determine the performance of a 
server is to measure it - there are simply too many interacations at a 
system level to make sense of any simple calculations.


A server set to handle 200 max connections with a response time of 200ms
can probably handle around about 1000 connections a second.

Factors to consider:

1. what kind of application? Simple file access or complex database?
2. the need for failover (clustering etc)
3. what kind of user interaction? (forms, simple page browsing?)


It should be noted that client interactions using 'ajax' techniques 
where the browser reconnects mid-page can actually cause a significant 
increase in server traffic. Once again, the only way to know is to 
experiment.


HTH

Alan Chaney






Stephanie Wullbieter wrote:

Hello,

on 
http://tomcat.apache.org/tomcat-5.5-doc/config/http.html


is for parameter MaxThreads written:

"The maximum number of request processing threads to be created by this Connector, 
which therefore determines the maximum number of simultaneous requests that can be 
handled. If not specified, this attribute is set to 200."

Could You please tell me what exact a "request" is?

Does it mean that when I have e.g. MaxThreads=20, 100 users can use my webapp 
if only 20 of them at the same time request data from the webapp and the others 
drink coffee?

Is it the same when i have session based sso login?

Thank You kindly


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



RE: MaxThreads <-> max. users ?

2008-04-30 Thread Caldarale, Charles R
> From: Stephanie Wullbieter [mailto:[EMAIL PROTECTED] 
> Subject: MaxThreads <-> max. users ?
> 
> Could You please tell me what exact a "request" is?

An HTTP GET, POST, etc., request from a client (usually a browser).
Note that retrieval of a single web page may result in many separate
requests from the client to load images, CSS files, scripts, etc.

> Does it mean that when I have e.g. MaxThreads=20, 100 users 
> can use my webapp if only 20 of them at the same time request 
> data from the webapp and the others drink coffee?

Yes, with restrictions.  If the client maintains a keep-alive request
and you're using the standard connector, a thread will be tied up for
the duration.  If you use the NIO or APR connectors, the thread will be
released back to the pool in the keep-alive situation.  Take a look at
the table at the bottom of this page:
http://tomcat.apache.org/tomcat-6.0-doc/config/http.html#Connector%20Com
parison

> Is it the same when i have session based sso login?

Yes; they're independent mechanisms.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



Re: MaxThreads <-> max. users ?

2008-04-30 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Stephanie,

Stephanie Wullbieter wrote:
| Could You please tell me what exact a "request" is?
|
| Does it mean that when I have e.g. MaxThreads=20, 100 users can use
| my webapp if only 20 of them at the same time request data from the
| webapp and the others drink coffee?

Exactly. A request is when the client makes a connection to the web
server and issues an HTTP request (like GET /index.html). While that
request is being processes (typically a very short amount of time), one
of the threads configured above is busy handling the request. After the
request has been handled, the thread goes back to sleep to wait for
another request to come on.

| Is it the same when i have session based sso login?

Sessions, SSO, etc. do not affect this behavior.

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

iEYEARECAAYFAkgYkMsACgkQ9CaO5/Lv0PB3YgCeIkDlB6pswhNQpWbP8XzDkGRn
glwAn1woJafGRd7PHgqglBj5+xiz3Quv
=yzZP
-END PGP SIGNATURE-

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



Re: maxThreads compared to maxProcessors

2006-05-10 Thread Bill Barker

"Sean O'Reilly" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>I am using maxThreads in my ajp connector configuration in tomcat-5.0.28
> but looking at the documentation it says i should be using
> maxProcessors. Is this the case ?
>

I believe that on 5.0.x, maxProcessors is an alias for maxThreads (but I 
don't care enough to look :).  The maxThreads attribute will work however. 
On 5.5.x, the documentation is wrong:  The maxProcessors attribute isn't 
simply deprecated, it is ignored.

> -- 
> Sean O'Reilly
> Systems Administrator
> SECPay Ltd
>
> http://www.secpay.com
>
> [EMAIL PROTECTED]
>
> Mobile 07917 463906
>
> DDI 01732 300212
>
> This email contains information which is confidential. It is for the
> exclusive use of the addressee(s). If you are not the addressee, please
> note that any distribution, dissemination, copying or use of this
> communication or the information in it is prohibited. If you have
> received this email in error, please telephone me immediately. 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]