Re: Meaning of threads

2005-01-25 Thread Andrew Miehs
Using the worker-mpm or fork-mpm, apache does the same nasty thing with
threads and keep-alive, although I believe that when its starts running 
out of threads
it stops offering keep-alives - and to make matters worse - for each 
connection
you now have 2 threads - one for apache and one for tomcat -

Andrew
On Jan 25, 2005, at 6:46 AM, Sean M. Duncan wrote:
What is the impact of having apache httpd allow keep alive requests 
when
using the AJP connector to tomcat?  Does this have any impact on
tomcat's thread usage?  How well does httpd itself deal with keep alive
pipelines under a heavy user load?

-Sean

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


Meaning of threads

2005-01-24 Thread Dola Woolfe
Hi,

Where can I read about the meaning of the following
options: maxThreads=150 minSpareThreads=25
maxSpareThreads=75

My server tends to lock out a user who bombards it
with requests so I'm wondering whether those options
have anything to do with it before I post the problem
here.


Aaron Fude



__ 
Do you Yahoo!? 
All your favorites on one personal page – Try My Yahoo!
http://my.yahoo.com 

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



Re: Meaning of threads

2005-01-24 Thread Filip Hanik - Dev
maxThreads=150

your server can handle a maximum of 150 concurrent clients

minSpareThreads=25
if your server is idle, it will at least have 25 threads waiting to handle 
requests

maxSpareThreads=75
if your server is idle, it will have no more than 75 threads waiting to handle 
requests

you get the direction this is going in, right?
Filip

- Original Message - 
From: Dola Woolfe [EMAIL PROTECTED]
To: Tom Cat tomcat-user@jakarta.apache.org
Sent: Monday, January 24, 2005 2:51 PM
Subject: Meaning of threads


Hi,

Where can I read about the meaning of the following
options: maxThreads=150 minSpareThreads=25
maxSpareThreads=75

My server tends to lock out a user who bombards it
with requests so I'm wondering whether those options
have anything to do with it before I post the problem
here.


Aaron Fude



__ 
Do you Yahoo!? 
All your favorites on one personal page - Try My Yahoo!
http://my.yahoo.com 

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

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



Re: Meaning of threads

2005-01-24 Thread Dola Woolfe
Yes, I get the direction this is going in!

I assume that the reason for having threads waiting is
that they take time to be created? And you don't want
to have too many because they take up memory?

I can't resist asking a question about optimal values.
Since the answer is obviously it depends let me put
my question this way. If you were running craigslist
(I assume you've heard of it) what would these values
be? How about ebay?


--- Filip Hanik - Dev [EMAIL PROTECTED] wrote:

 maxThreads=150
 
 your server can handle a maximum of 150 concurrent
 clients
 
 minSpareThreads=25
 if your server is idle, it will at least have 25
 threads waiting to handle requests
 
 maxSpareThreads=75
 if your server is idle, it will have no more than 75
 threads waiting to handle requests
 
 you get the direction this is going in, right?
 Filip
 
 - Original Message - 
 From: Dola Woolfe [EMAIL PROTECTED]
 To: Tom Cat tomcat-user@jakarta.apache.org
 Sent: Monday, January 24, 2005 2:51 PM
 Subject: Meaning of threads
 
 
 Hi,
 
 Where can I read about the meaning of the following
 options: maxThreads=150 minSpareThreads=25
 maxSpareThreads=75
 
 My server tends to lock out a user who bombards it
 with requests so I'm wondering whether those options
 have anything to do with it before I post the
 problem
 here.
 
 
 Aaron Fude
 
 
 
 __ 
 Do you Yahoo!? 
 All your favorites on one personal page - Try My
 Yahoo!
 http://my.yahoo.com 
 

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

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





__ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail

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



Re: Meaning of threads

2005-01-24 Thread Filip Hanik - Dev
the number of threads will depend on the size of your machine,
but to support many concurrent users, you will want to turn off keep alive 
connections, as these will have the opposite effect.

Filip

- Original Message - 
From: Dola Woolfe [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Monday, January 24, 2005 3:29 PM
Subject: Re: Meaning of threads


Yes, I get the direction this is going in!

I assume that the reason for having threads waiting is
that they take time to be created? And you don't want
to have too many because they take up memory?

I can't resist asking a question about optimal values.
Since the answer is obviously it depends let me put
my question this way. If you were running craigslist
(I assume you've heard of it) what would these values
be? How about ebay?


--- Filip Hanik - Dev [EMAIL PROTECTED] wrote:

 maxThreads=150
 
 your server can handle a maximum of 150 concurrent
 clients
 
 minSpareThreads=25
 if your server is idle, it will at least have 25
 threads waiting to handle requests
 
 maxSpareThreads=75
 if your server is idle, it will have no more than 75
 threads waiting to handle requests
 
 you get the direction this is going in, right?
 Filip
 
 - Original Message - 
 From: Dola Woolfe [EMAIL PROTECTED]
 To: Tom Cat tomcat-user@jakarta.apache.org
 Sent: Monday, January 24, 2005 2:51 PM
 Subject: Meaning of threads
 
 
 Hi,
 
 Where can I read about the meaning of the following
 options: maxThreads=150 minSpareThreads=25
 maxSpareThreads=75
 
 My server tends to lock out a user who bombards it
 with requests so I'm wondering whether those options
 have anything to do with it before I post the
 problem
 here.
 
 
 Aaron Fude
 
 
 
 __ 
 Do you Yahoo!? 
 All your favorites on one personal page - Try My
 Yahoo!
 http://my.yahoo.com 
 

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

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





__ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail

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

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



Re: Meaning of threads

2005-01-24 Thread Dola Woolfe
That's counterintuitive, isn't it?

How come?

--- Filip Hanik - Dev [EMAIL PROTECTED] wrote:

 the number of threads will depend on the size of
 your machine,
 but to support many concurrent users, you will want
 to turn off keep alive connections, as these will
 have the opposite effect.
 
 Filip
 
 - Original Message - 
 From: Dola Woolfe [EMAIL PROTECTED]
 To: Tomcat Users List
 tomcat-user@jakarta.apache.org
 Sent: Monday, January 24, 2005 3:29 PM
 Subject: Re: Meaning of threads
 
 
 Yes, I get the direction this is going in!
 
 I assume that the reason for having threads waiting
 is
 that they take time to be created? And you don't
 want
 to have too many because they take up memory?
 
 I can't resist asking a question about optimal
 values.
 Since the answer is obviously it depends let me
 put
 my question this way. If you were running
 craigslist
 (I assume you've heard of it) what would these
 values
 be? How about ebay?
 
 
 --- Filip Hanik - Dev [EMAIL PROTECTED] wrote:
 
  maxThreads=150
  
  your server can handle a maximum of 150 concurrent
  clients
  
  minSpareThreads=25
  if your server is idle, it will at least have 25
  threads waiting to handle requests
  
  maxSpareThreads=75
  if your server is idle, it will have no more than
 75
  threads waiting to handle requests
  
  you get the direction this is going in, right?
  Filip
  
  - Original Message - 
  From: Dola Woolfe [EMAIL PROTECTED]
  To: Tom Cat tomcat-user@jakarta.apache.org
  Sent: Monday, January 24, 2005 2:51 PM
  Subject: Meaning of threads
  
  
  Hi,
  
  Where can I read about the meaning of the
 following
  options: maxThreads=150 minSpareThreads=25
  maxSpareThreads=75
  
  My server tends to lock out a user who bombards it
  with requests so I'm wondering whether those
 options
  have anything to do with it before I post the
  problem
  here.
  
  
  Aaron Fude
  
  
  
  __ 
  Do you Yahoo!? 
  All your favorites on one personal page - Try My
  Yahoo!
  http://my.yahoo.com 
  
 

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

-
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  
  
 
 
 
 
 
 __ 
 Do you Yahoo!? 
 Yahoo! Mail - You care about security. So do we. 
 http://promotions.yahoo.com/new_mail
 

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

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




__ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail

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



AW: Meaning of threads

2005-01-24 Thread Steffen Heil
Hi

 the number of threads will depend on the size of your 
 machine, but to support many concurrent users, you will want 
 to turn off keep alive connections, as these will have the 
 opposite effect.

Wouldn't it make more sense to enable keep alive connections and increase
the thread count - if memory suffices?

Even if not, the keep-alive timeout should be decreased instead of disabled
all together.

Additionally I'd like to see tomcat to be able to drop keep-alive connection
exactly then, when all threads are busy and a new connection is to be
etablished.
That would give us the benefit of keep alive connections - faster data
delivery for users - as well as optimal thread usage even on small thread
pools.

What is your opinion?

Regards,
  Steffen


smime.p7s
Description: S/MIME cryptographic signature


Re: Meaning of threads

2005-01-24 Thread Andrew Miehs
I would also consider turning of keepalive. Unfortunately tomcat (and 
apache)
both setup one thread per connection. You may be able to use squid as a
reverse proxy if you are having load/ number of connection/ thread 
problems
depending on your application

Andrew
On Jan 24, 2005, at 10:11 PM, Filip Hanik - Dev wrote:
maxThreads=150
your server can handle a maximum of 150 concurrent clients
minSpareThreads=25
if your server is idle, it will at least have 25 threads waiting to 
handle requests

maxSpareThreads=75
if your server is idle, it will have no more than 75 threads waiting 
to handle requests

you get the direction this is going in, right?
Filip

My server tends to lock out a user who bombards it
with requests so I'm wondering whether those options
have anything to do with it before I post the problem
here.


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


Re: Meaning of threads

2005-01-24 Thread Filip Hanik - Dev
no, think about it a little bit longer, what does a keepalive connection do,

it hogs one thread per client, not per concurrent user. so now other clients 
will be stuck waiting cause you have keepalive turned
on, and a user is sitting idle doing nothing, but yet, taking up server 
resources

Filip

- Original Message -
From: Dola Woolfe [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Monday, January 24, 2005 3:50 PM
Subject: Re: Meaning of threads


That's counterintuitive, isn't it?

How come?

--- Filip Hanik - Dev [EMAIL PROTECTED] wrote:

 the number of threads will depend on the size of
 your machine,
 but to support many concurrent users, you will want
 to turn off keep alive connections, as these will
 have the opposite effect.

 Filip

 - Original Message -
 From: Dola Woolfe [EMAIL PROTECTED]
 To: Tomcat Users List
 tomcat-user@jakarta.apache.org
 Sent: Monday, January 24, 2005 3:29 PM
 Subject: Re: Meaning of threads


 Yes, I get the direction this is going in!

 I assume that the reason for having threads waiting
 is
 that they take time to be created? And you don't
 want
 to have too many because they take up memory?

 I can't resist asking a question about optimal
 values.
 Since the answer is obviously it depends let me
 put
 my question this way. If you were running
 craigslist
 (I assume you've heard of it) what would these
 values
 be? How about ebay?


 --- Filip Hanik - Dev [EMAIL PROTECTED] wrote:

  maxThreads=150
 
  your server can handle a maximum of 150 concurrent
  clients
 
  minSpareThreads=25
  if your server is idle, it will at least have 25
  threads waiting to handle requests
 
  maxSpareThreads=75
  if your server is idle, it will have no more than
 75
  threads waiting to handle requests
 
  you get the direction this is going in, right?
  Filip
 
  - Original Message -
  From: Dola Woolfe [EMAIL PROTECTED]
  To: Tom Cat tomcat-user@jakarta.apache.org
  Sent: Monday, January 24, 2005 2:51 PM
  Subject: Meaning of threads
 
 
  Hi,
 
  Where can I read about the meaning of the
 following
  options: maxThreads=150 minSpareThreads=25
  maxSpareThreads=75
 
  My server tends to lock out a user who bombards it
  with requests so I'm wondering whether those
 options
  have anything to do with it before I post the
  problem
  here.
 
 
  Aaron Fude
 
 
 
  __
  Do you Yahoo!?
  All your favorites on one personal page - Try My
  Yahoo!
  http://my.yahoo.com
 
 

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

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





 __
 Do you Yahoo!?
 Yahoo! Mail - You care about security. So do we.
 http://promotions.yahoo.com/new_mail


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


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






__
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail

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


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



Re: AW: Meaning of threads

2005-01-24 Thread Andrew Miehs
On Jan 24, 2005, at 11:09 PM, Steffen Heil wrote:
Hi
the number of threads will depend on the size of your
machine, but to support many concurrent users, you will want
to turn off keep alive connections, as these will have the
opposite effect.
Wouldn't it make more sense to enable keep alive connections and 
increase
the thread count - if memory suffices?

Unfortunately not. IMHO threads are over used and over rated.
Have a look at the reasons THTTPD and Zeus webserver were created.
I was told that the 'Java Servlet Spec' (I think this was the one) 
requires
one thread per connection. I can understand the reasoning behind this,
as it makes the implementation much easier.

In my experience however, this does NOT work well in a high traffic 
situation.
It makes NO sense for a machine to need to deal with 1000+ threads. 
(Unless
of course you have an E15000 in the basement with 1000 processors). I 
had
major problems with Debian Woody as the supplied Glib C as I was unable
to get java to start more than 250 threads. Sarge was better in that it 
supported
the new linux threading library out of the box. I do not have any 
experience with
Solaris or Windows when dealing with that many threads.

You need to disable keep-alives, becuase if you don't you end up 
wasting a lot
of threads that just sit waiting for the next request on that 
connection - meaning
even more threads just hanging around.

The scary thing is, imagine something hangs on the backend for 30 
seconds, and
then all your 1000 threads start trying to do something at once You 
will end up
with a load of 1000 and ALL your requests will take a long time to 
return.

It may be interesting to replace the http connector for tomcat with one 
that uses
select and uses 'threads' as a type of worker pool. This way, you can 
deal with
all the connections in the select loop (incl. keep-alive) and still 
have the advantage
of not needing to remember state due to the worker threads to the back 
end...

My 2c
Andrew

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


Re: AW: Meaning of threads

2005-01-24 Thread Dola Woolfe

In my experience however, this does NOT work well in
a high traffic situation.

I'm sure you're not saying that Tomcat does NOT work
well in a high traffic situation. You are just saying
that in a high traffic situation one should turn off
keep alives.

Am I guessing correctly that I have only a few
persistent visitors (such as an office web application
that is a front end to a database) then turning keep
alives on will cause the data to be returned to the
user more promptly.

But if, say, you are running an eBay type site, keep
alives should be turned off.  Any single user will
suffer a little but the traffic will be handled
better.


Aaron Fude




__ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 


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



Re: Re: AW: Meaning of threads

2005-01-24 Thread bounce
Geachte relatie,

Het door u gebruikte e-mailadres is niet meer actief. U kunt uw e-mailbericht 
sturen naar [EMAIL PROTECTED] of dit bericht beantwoorden.

Bedankt voor uw medewerking,

Met vriendelijke groet,

ATP Hypotheken
Het Spoor 40
3994 AK Houten

Tel. 030 750 25 33
Fax. 030 750 25 88
[EMAIL PROTECTED]

 -- DIT IS EEN AUTOMATISCH GEGENEREERD E-MAILBERICHT --



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



Re: Meaning of threads

2005-01-24 Thread Sean M. Duncan
What is the impact of having apache httpd allow keep alive requests when
using the AJP connector to tomcat?  Does this have any impact on
tomcat's thread usage?  How well does httpd itself deal with keep alive
pipelines under a heavy user load?

-Sean

On Mon, 2005-01-24 at 16:23 -0600, Filip Hanik - Dev wrote:
 no, think about it a little bit longer, what does a keepalive connection do,
 
 it hogs one thread per client, not per concurrent user. so now other clients 
 will be stuck waiting cause you have keepalive turned
 on, and a user is sitting idle doing nothing, but yet, taking up server 
 resources
 
 Filip
 
 - Original Message -
 From: Dola Woolfe [EMAIL PROTECTED]
 To: Tomcat Users List tomcat-user@jakarta.apache.org
 Sent: Monday, January 24, 2005 3:50 PM
 Subject: Re: Meaning of threads
 
 
 That's counterintuitive, isn't it?
 
 How come?
 
 --- Filip Hanik - Dev [EMAIL PROTECTED] wrote:
 
  the number of threads will depend on the size of
  your machine,
  but to support many concurrent users, you will want
  to turn off keep alive connections, as these will
  have the opposite effect.
 
  Filip
 
  - Original Message -
  From: Dola Woolfe [EMAIL PROTECTED]
  To: Tomcat Users List
  tomcat-user@jakarta.apache.org
  Sent: Monday, January 24, 2005 3:29 PM
  Subject: Re: Meaning of threads
 
 
  Yes, I get the direction this is going in!
 
  I assume that the reason for having threads waiting
  is
  that they take time to be created? And you don't
  want
  to have too many because they take up memory?
 
  I can't resist asking a question about optimal
  values.
  Since the answer is obviously it depends let me
  put
  my question this way. If you were running
  craigslist
  (I assume you've heard of it) what would these
  values
  be? How about ebay?
 
 
  --- Filip Hanik - Dev [EMAIL PROTECTED] wrote:
 
   maxThreads=150
  
   your server can handle a maximum of 150 concurrent
   clients
  
   minSpareThreads=25
   if your server is idle, it will at least have 25
   threads waiting to handle requests
  
   maxSpareThreads=75
   if your server is idle, it will have no more than
  75
   threads waiting to handle requests
  
   you get the direction this is going in, right?
   Filip
  
   - Original Message -
   From: Dola Woolfe [EMAIL PROTECTED]
   To: Tom Cat tomcat-user@jakarta.apache.org
   Sent: Monday, January 24, 2005 2:51 PM
   Subject: Meaning of threads
  
  
   Hi,
  
   Where can I read about the meaning of the
  following
   options: maxThreads=150 minSpareThreads=25
   maxSpareThreads=75
  
   My server tends to lock out a user who bombards it
   with requests so I'm wondering whether those
  options
   have anything to do with it before I post the
   problem
   here.
  
  
   Aaron Fude
  
  
  
   __
   Do you Yahoo!?
   All your favorites on one personal page - Try My
   Yahoo!
   http://my.yahoo.com
  
  
 
 -
   To unsubscribe, e-mail:
   [EMAIL PROTECTED]
   For additional commands, e-mail:
   [EMAIL PROTECTED]
  
  
 
 -
   To unsubscribe, e-mail:
   [EMAIL PROTECTED]
   For additional commands, e-mail:
   [EMAIL PROTECTED]
  
  
 
 
 
 
 
  __
  Do you Yahoo!?
  Yahoo! Mail - You care about security. So do we.
  http://promotions.yahoo.com/new_mail
 
 
 -
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
 
 
 -
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
 
 
 
 
 
 
 __
 Do you Yahoo!?
 Yahoo! Mail - Helps protect you from nasty viruses.
 http://promotions.yahoo.com/new_mail
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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