You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by GOMEZ Henri <hg...@slib.fr> on 2001/08/29 12:32:13 UTC

RE: TC323 standalone/ajp13 & thread pools

>Hi (.*),
>
>	Hope all is well around the globe.
>
>	We've been doing some stress testing here with Tomcat 
>3.2.3 operating
>	in standalone mode and with apache via the mod_jk ajp13 
>connector.
>
>	We've noticed something interesting which we're not sure about.
>
>	Tomcat running our application standalone can handle 70 
>simultaneous
>	users, with a TcpPoolConnector thread pool set to 150. 
>When we run the
>	same test via Apache/ajp13, the thread pool is quickly exhausted
>	(logged in tomcat.log)

You may have find something interesting. 

Could you check via netstat in that situation how many ajp connections
are in CLOSE-WAIT ?

>	Is this normal operation ? Should an ajp13 connector 
>consume more tomcat threads than standalone tomcat ?

http native connector (HTTP/1.0) close connection at end of
request. In ajp13 the connections between apache and tomcat
are persistant. What I didn't understand is how you could 
have 150 ajp13 connections to handle only 70 clients ?
	
Stay tuned

war files

Posted by peter <pe...@btinternet.com>.
Hi all

I'm using tomcat-3.2.3 on win98.  Every time I place a .war file in the
webapps dir tomcat starts and closes down straight away.  When I remove the
.war file tomcat works fine.  Can someone please tell me why this might be?


Thanks


Peter


Re: TC323 standalone/ajp13 & thread pools

Posted by Christopher Cain <cc...@mhsoftware.com>.
Bill Lipa wrote:
> 
> How many Apache children do you have?

Hehe ...

I don't have any myself, but there are two in my neighborhood: "Dances
With Pokemon" and "Running Rugrat". Those damn kids are always playing
around in the steet in full head-dress, which incidentally freaks out
the neighborhood cats. :)

- Christopher

Thoughts on the word buglet was Re: TC323 standalone/ajp13 & thread pools

Posted by simon <si...@lexues.co.jp>.
Love the word "buglet" - looking forward to seeing someone use the word "featurelet" - haven't seen it yet.

simon

----- Original Message ----- 
From: "Bill Lipa" <po...@yahoo.com>
To: "GOMEZ Henri" <hg...@slib.fr>; <to...@jakarta.apache.org>; <to...@jakarta.apache.org>
Cc: <to...@jakarta.apache.org>; "Bill Lipa" <po...@yahoo.com>
Sent: Thursday, August 30, 2001 3:26 PM
Subject: RE: TC323 standalone/ajp13 & thread pools


> How many Apache children do you have?  The default is 256, which will indeed
> almost immediately consume all the threads in the Tomcat thread pool if you do
> not increase it.  Each Apache child uses a thread.
> 
> With ajp13, what counts is really the number of Apache children that are
> active.  You can easily count them with the Apache status mod or by using ps.
> 
> It is really a "buglet" that the Tomcat thread default is set lower than the
> Apache default.
> 
> Bill
> 
> 
> --- GOMEZ Henri <hg...@slib.fr> wrote:
> > >Hi (.*),
> > >
> > > Hope all is well around the globe.
> > >
> > > We've been doing some stress testing here with Tomcat 
> > >3.2.3 operating
> > > in standalone mode and with apache via the mod_jk ajp13 
> > >connector.
> > >
> > > We've noticed something interesting which we're not sure about.
> > >
> > > Tomcat running our application standalone can handle 70 
> > >simultaneous
> > > users, with a TcpPoolConnector thread pool set to 150. 
> > >When we run the
> > > same test via Apache/ajp13, the thread pool is quickly exhausted
> > > (logged in tomcat.log)
> > 
> > You may have find something interesting. 
> > 
> > Could you check via netstat in that situation how many ajp connections
> > are in CLOSE-WAIT ?
> > 
> > > Is this normal operation ? Should an ajp13 connector 
> > >consume more tomcat threads than standalone tomcat ?
> > 
> > http native connector (HTTP/1.0) close connection at end of
> > request. In ajp13 the connections between apache and tomcat
> > are persistant. What I didn't understand is how you could 
> > have 150 ajp13 connections to handle only 70 clients ?
> > 
> > Stay tuned
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
> http://im.yahoo.com
> 


RE: TC323 standalone/ajp13 & thread pools

Posted by Bill Lipa <po...@yahoo.com>.
--- Marcus Crafter <cr...@fztig938.bank.dresdner.net> wrote:

> 	So if I understand you correctly, we should have our Tomcat pool size
> 	set to the same as the MaxClients setting we have for Apache - as a
> 	general rule ?
> 
> 	We'll retest with these settings. Thanks very much for your advice. :-)
> 

I think you should leave a little margin in case some threads are used for
other things.  In our production environment, we have MaxClients set to 256,
and the size of the Tomcat thread pool set to 300.

Henri Gomez also says that if worker.ajp13.cachesize is set > 1, Tomcat may
need even more threads.  This is not the default setting, however.

Bill


__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

RE: TC323 standalone/ajp13 & thread pools

Posted by Marcus Crafter <cr...@fztig938.bank.dresdner.net>.
Hi Bill,

On Wed, 29 Aug 2001, Bill Lipa wrote:

> How many Apache children do you have?  The default is 256, which will indeed
> almost immediately consume all the threads in the Tomcat thread pool if you do
> not increase it.  Each Apache child uses a thread.

	Ok. Thanks for the information. Our MaxClients is set to 256, there
	are between 100 and 256 httpd processes running when we've tested our
	application (it changes dynamically during the tests).

> With ajp13, what counts is really the number of Apache children that are
> active.  You can easily count them with the Apache status mod or by using ps.
> 
> It is really a "buglet" that the Tomcat thread default is set lower than the
> Apache default.

	So if I understand you correctly, we should have our Tomcat pool size
	set to the same as the MaxClients setting we have for Apache - as a
	general rule ?

	We'll retest with these settings. Thanks very much for your advice. :-)

	Cheers,

	Marcus

-- 
        .....
     ,,$$$$$$$$$,      Marcus Crafter
    ;$'      '$$$$:    Computer Systems Engineer
    $:         $$$$:   Open Software Associates GmbH
     $       o_)$$$:   82-84 Mainzer Landstrasse
     ;$,    _/\ &&:'   60327 Frankfurt Germany
       '     /( &&&
           \_&&&&'     Email : Marcus.Crafter@osa.de
          &&&&.        Business Hours : +49 69 9757 200
    &&&&&&&:


RE: TC323 standalone/ajp13 & thread pools

Posted by Bill Lipa <po...@yahoo.com>.
How many Apache children do you have?  The default is 256, which will indeed
almost immediately consume all the threads in the Tomcat thread pool if you do
not increase it.  Each Apache child uses a thread.

With ajp13, what counts is really the number of Apache children that are
active.  You can easily count them with the Apache status mod or by using ps.

It is really a "buglet" that the Tomcat thread default is set lower than the
Apache default.

Bill


--- GOMEZ Henri <hg...@slib.fr> wrote:
> >Hi (.*),
> >
> >	Hope all is well around the globe.
> >
> >	We've been doing some stress testing here with Tomcat 
> >3.2.3 operating
> >	in standalone mode and with apache via the mod_jk ajp13 
> >connector.
> >
> >	We've noticed something interesting which we're not sure about.
> >
> >	Tomcat running our application standalone can handle 70 
> >simultaneous
> >	users, with a TcpPoolConnector thread pool set to 150. 
> >When we run the
> >	same test via Apache/ajp13, the thread pool is quickly exhausted
> >	(logged in tomcat.log)
> 
> You may have find something interesting. 
> 
> Could you check via netstat in that situation how many ajp connections
> are in CLOSE-WAIT ?
> 
> >	Is this normal operation ? Should an ajp13 connector 
> >consume more tomcat threads than standalone tomcat ?
> 
> http native connector (HTTP/1.0) close connection at end of
> request. In ajp13 the connections between apache and tomcat
> are persistant. What I didn't understand is how you could 
> have 150 ajp13 connections to handle only 70 clients ?
> 	
> Stay tuned


__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

RE: TC323 standalone/ajp13 & thread pools

Posted by Marcus Crafter <cr...@fztig938.bank.dresdner.net>.
Hi,

On Wed, 29 Aug 2001, GOMEZ Henri wrote:

> You may have find something interesting. 
> 
> Could you check via netstat in that situation how many ajp connections
> are in CLOSE-WAIT ?

	When using ajp13, all of the connections were ESTABLISHED. There were
	slightly more httpd processes than there were connections (~100-110)

> >	Is this normal operation ? Should an ajp13 connector 
> >consume more tomcat threads than standalone tomcat ?
> 
> http native connector (HTTP/1.0) close connection at end of
> request. In ajp13 the connections between apache and tomcat
> are persistant. What I didn't understand is how you could 
> have 150 ajp13 connections to handle only 70 clients ?

	1 page in our application actually incurs 3 or 4 requests due to
	script includes, header and footer images, etc. I had presumed that
	these extra requests take up their own connections, hence requiring
	x2/3 count of ajp13 connections than clients. Was this presumption
	wrong ?

	Thanks very much for your respone. Much appreciated :-)

	Cheers,

	Marcus

-- 
        .....
     ,,$$$$$$$$$,      Marcus Crafter
    ;$'      '$$$$:    Computer Systems Engineer
    $:         $$$$:   Open Software Associates GmbH
     $       o_)$$$:   82-84 Mainzer Landstrasse
     ;$,    _/\ &&:'   60327 Frankfurt Germany
       '     /( &&&
           \_&&&&'     Email : Marcus.Crafter@osa.de
          &&&&.        Business Hours : +49 69 9757 200
    &&&&&&&:



RE: TC323 standalone/ajp13 & thread pools

Posted by Bill Lipa <po...@yahoo.com>.
How many Apache children do you have?  The default is 256, which will indeed
almost immediately consume all the threads in the Tomcat thread pool if you do
not increase it.  Each Apache child uses a thread.

With ajp13, what counts is really the number of Apache children that are
active.  You can easily count them with the Apache status mod or by using ps.

It is really a "buglet" that the Tomcat thread default is set lower than the
Apache default.

Bill


--- GOMEZ Henri <hg...@slib.fr> wrote:
> >Hi (.*),
> >
> >	Hope all is well around the globe.
> >
> >	We've been doing some stress testing here with Tomcat 
> >3.2.3 operating
> >	in standalone mode and with apache via the mod_jk ajp13 
> >connector.
> >
> >	We've noticed something interesting which we're not sure about.
> >
> >	Tomcat running our application standalone can handle 70 
> >simultaneous
> >	users, with a TcpPoolConnector thread pool set to 150. 
> >When we run the
> >	same test via Apache/ajp13, the thread pool is quickly exhausted
> >	(logged in tomcat.log)
> 
> You may have find something interesting. 
> 
> Could you check via netstat in that situation how many ajp connections
> are in CLOSE-WAIT ?
> 
> >	Is this normal operation ? Should an ajp13 connector 
> >consume more tomcat threads than standalone tomcat ?
> 
> http native connector (HTTP/1.0) close connection at end of
> request. In ajp13 the connections between apache and tomcat
> are persistant. What I didn't understand is how you could 
> have 150 ajp13 connections to handle only 70 clients ?
> 	
> Stay tuned


__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com