tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: a question about tomcat thread
Date Wed, 23 Aug 2017 20:26:29 GMT
On 23/08/17 21:17, Christopher Schultz wrote:
> To whom it may concern,
> 
> On 8/22/17 10:28 PM, ophusky wrote:
>> Server version: Apache Tomcat/8.0.35 Server built:   May 11 2016
>> 21:57:08 UTC Server number:  8.0.35.0 OS Name:        Linux OS
>> Version:     3.2.35 Architecture:   amd64 JVM Version:
>> 1.8.0_45-b14 JVM Vendor:     Oracle Corporation
> 
> Thanks!
> 
>> 1. [root@app41 manager]# curl -s http://127.0.0.1/manager/status
>> |grep -P -o 'Max threads:.*?<br> ' Max threads: 700 Current thread
>> count: 478 Current thread busy: 17 Keeped alive sockets count:
>> 5<br> 2. [root@app41 manager]# pgrep jsvc 25446 25447 [root@app41
>> manager]# ps -Lf 25447 | wc -l 541
> 
> Okay.
> 
>> I want to figure out the meaning of "Current thread count"
>> "Current thread busy" "Keeped alive sockets count" and relationship
>> between 1 and 2.
> 
> Max threads >= current thread count
> Current thread count >= current thread busy
> Current thread count >= Keeped alive sockets count

That is true for BIO, but not for any of the other connections which are
all non-blocking between requests. With those connectors you can have up
to maxConnections open sockets in HTTP keep-alive waiting for data to
arrive.

Mark

> 
>> I have read the document
>> http://tomcat.apache.org/tomcat-8.0-doc/manager-howto.html#Server_Stat
> us
>>  if "Current thread busy" mean  "Parse and Prepare Request"  and
>> "Service"
> 
> Also "Finishing"
> 
> ? "Keeped alive sockets count" mean  "Keep-Alive"?
> 
> Yes.
> 
> One question you didn't ask, but shows data for was "why does my
> process have 541 threads when Tomcat says it's got 478 threads". The
> answer is that Tomcat and the JVM are both running threads that are
> not servicing requests.
> 
> Take a thread dump of your JVM to see what those other threads are
> doing, and you'll see things like the "Finalizer" thread, various
> threads for GC, JIT, AWT (if graphics subsystem has been launched),
> the main thread itself, etc.
> 
> -chris
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


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


Mime
View raw message