RE: Thread state differences according to Tomcat 7, 8 version.

2018-03-27 Thread 이의준
Test sequence and inquiry contents
1. In the local test, the same load (hp-jmeter) for tomcat 7, 8 5 minutes,
2. Thread dump generated after 5 minutes of load termination
3. Thread in Tomcat 7 is in TIME_WAITING state (normally OK)
4. Thread in Tomcat 8 mostly RUNNABLE state (estimated to be abnormal)
 Thread Final Stack - Below (reading something)
 at org.apache.tomcat.jni.Socket.recvbb (Native Method)

5. Is the thread status of Tomcat 8 normal?
6. Does Tomcat 7 and Thread work differently?

Best regards

-Original Message-
From: 이의준 <ej@time-gate.com> 
Sent: Tuesday, March 27, 2018 10:47 PM
To: Rainer Jung <rainer.j...@kippdata.de>; Tomcat Users List 
<users@tomcat.apache.org>
Subject: Re: Thread state differences according to Tomcat 7, 8 version.

Thank you for answer.
​
As a further explanation, after a certain amount of time has elapsed after 
applying the same load to both groups, all threads in the tomcat7 group are in 
the TIME-WAITING state, and TOMCAT8 is in the RUNNABLE state.
So I guess there is a difference in THREAD behavior between Tomcat versions.
​
-Original Message-
From: "Rainer Jung"<rainer.j...@kippdata.de>
To: "Tomcat Users List"<users@tomcat.apache.org>; "이의준"<ej@time-gate.com>;
Cc:
Sent: 2018-03-27 (화) 22:16:20
Subject: Re: Thread state differences according to Tomcat 7, 8 version.
 
See below

Am 27.03.2018 um 07:50 schrieb 이의준:
> Hi !
>
> English is not my native language; please excuse typing errors.
>
> Why is Tomcat not handling requests with 8 versions, but in the 
> RUNNABLE state, not the TIME_WAITING state of the Tomcat 7 version?
>
> Please confirm that this operation works normally.
>
>  
>
> #Tomcat 7.0.75  jdk 1.7.0.65
>
>  
>
> #server.xml
>
>  
>
>   URIEncoding="UTF-8"
>
>acceptCount="200" acceptorThreadCount="2" maxThreads="300"
>
>minSpareThreads="50" connectionTimeout="15000"/>
>
>  
>
> #There are more than 40 threads with the following stacks:
>
>  
>
> "ajp-apr-7009-exec-111" #10247 daemon prio=5 os_prio=0
> tid=0x7fa6b811f000 nid=0x2f51 waiting on condition 
> [0x7fa6aa7b8000]
>
> java.lang.Thread.State: TIMED_WAITING (parking)
>
> at sun.misc.Unsafe.park(Native Method)
>
> - parking to wait for  <0x83769178> (a
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
>
> at
> java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
>
> at
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.
> awaitN
> anos(AbstractQueuedSynchronizer.java:2078)
>
> at
> java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java
> :467)
>
> at
> org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:86)
>
> at
> org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:32)
>
> at
> java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.jav
> a:1066
> )
>
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.j
> ava:11
> 27)
>
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
> java:6
> 17)
>
> at
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThr
> ead.ja
> va:61)
>
> at java.lang.Thread.run(Thread.java:745)

These are thread idle in the thread pool.

> Tomcat 8.0.44 jdk 1.8.0.131
>
>  
>
> #server.xml
>
>  
>
>   URIEncoding="UTF-8"
>
>acceptCount="200" acceptorThreadCount="2" maxThreads="300"
>
>minSpareThreads="50" connectionTimeout="15000"/>
>
>  
>
> There are more than 50 threads with the following stacks:
>
>  
>
> "ajp-apr-7009-exec-1083" #19321 daemon prio=5 os_prio=0
> tid=0x7fcd1405d800 nid=0x19fe runnable [0x7fcc373f2000]
>
> java.lang.Thread.State: RUNNABLE
>
> at org.apache.tomcat.jni.Socket.recvbb(Native Method)
>
> at
> org.apache.coyote.ajp.AjpAprProcessor.readSocket(AjpAprProcessor.java:
> 256)
>
> at
> org.apache.coyote.ajp.AjpAprProcessor.read(AjpAprProcessor.java:197)
>
> at
> org.apache.coyote.ajp.AbstractAjpProcessor.readMessage(AbstractAjpProcessor.
> java:1091)
>
> at
> org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcesso

Re: Thread state differences according to Tomcat 7, 8 version.

2018-03-27 Thread 이의준
Thank you for answer.
​
As a further explanation, after a certain amount of time has elapsed after 
applying the same load to both groups, all threads in the tomcat7 group are in 
the TIME-WAITING state, and TOMCAT8 is in the RUNNABLE state.
So I guess there is a difference in THREAD behavior between Tomcat versions.
​
-Original Message-
From: "Rainer Jung"<rainer.j...@kippdata.de>
To: "Tomcat Users List"<users@tomcat.apache.org>; "이의준"<ej@time-gate.com>;
Cc:
Sent: 2018-03-27 (화) 22:16:20
Subject: Re: Thread state differences according to Tomcat 7, 8 version.
 
See below

Am 27.03.2018 um 07:50 schrieb 이의준:
> Hi !
>
> English is not my native language; please excuse typing errors.
>
> Why is Tomcat not handling requests with 8 versions, but in the RUNNABLE
> state, not the TIME_WAITING state of the Tomcat 7 version?
>
> Please confirm that this operation works normally.
>
>  
>
> #Tomcat 7.0.75  jdk 1.7.0.65
>
>  
>
> #server.xml
>
>  
>
>   URIEncoding="UTF-8"
>
>acceptCount="200" acceptorThreadCount="2" maxThreads="300"
>
>minSpareThreads="50" connectionTimeout="15000"/>
>
>  
>
> #There are more than 40 threads with the following stacks:
>
>  
>
> "ajp-apr-7009-exec-111" #10247 daemon prio=5 os_prio=0
> tid=0x7fa6b811f000 nid=0x2f51 waiting on condition [0x7fa6aa7b8000]
>
> java.lang.Thread.State: TIMED_WAITING (parking)
>
> at sun.misc.Unsafe.park(Native Method)
>
> - parking to wait for  <0x83769178> (a
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
>
> at
> java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
>
> at
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitN
> anos(AbstractQueuedSynchronizer.java:2078)
>
> at
> java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)
>
> at
> org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:86)
>
> at
> org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:32)
>
> at
> java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1066
> )
>
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11
> 27)
>
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6
> 17)
>
> at
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.ja
> va:61)
>
> at java.lang.Thread.run(Thread.java:745)

These are thread idle in the thread pool.

> Tomcat 8.0.44 jdk 1.8.0.131
>
>  
>
> #server.xml
>
>  
>
>   URIEncoding="UTF-8"
>
>acceptCount="200" acceptorThreadCount="2" maxThreads="300"
>
>minSpareThreads="50" connectionTimeout="15000"/>
>
>  
>
> There are more than 50 threads with the following stacks:
>
>  
>
> "ajp-apr-7009-exec-1083" #19321 daemon prio=5 os_prio=0
> tid=0x7fcd1405d800 nid=0x19fe runnable [0x7fcc373f2000]
>
> java.lang.Thread.State: RUNNABLE
>
> at org.apache.tomcat.jni.Socket.recvbb(Native Method)
>
> at
> org.apache.coyote.ajp.AjpAprProcessor.readSocket(AjpAprProcessor.java:256)
>
> at
> org.apache.coyote.ajp.AjpAprProcessor.read(AjpAprProcessor.java:197)
>
> at
> org.apache.coyote.ajp.AbstractAjpProcessor.readMessage(AbstractAjpProcessor.
> java:1091)
>
> at
> org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcessor.java
> :804)
>
> at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(Abstrac
> tProtocol.java:684)
>
> at
> org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEnd
> point.java:2458)
>
> - locked <0xf6bce3a0> (a
> org.apache.tomcat.util.net.AprEndpoint$AprSocketWrapper)
>
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11
> 42)
>
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6
> 17)
>
> at
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.ja
> va:61)
>
> at java.lang.Thread.run(Thread.java:748)


These are threads which are busy from the point of view of the thread
pool, but what they are doing is waiting for more data to arrive on a
connection they handle.

So the two groups of threads you have chosen are really in a different
state, not only Tomcat or Java version wise.

Regards,

Rainer


Re: Thread state differences according to Tomcat 7, 8 version.

2018-03-27 Thread Rainer Jung

See below

Am 27.03.2018 um 07:50 schrieb 이의준:

Hi !

English is not my native language; please excuse typing errors.

Why is Tomcat not handling requests with 8 versions, but in the RUNNABLE
state, not the TIME_WAITING state of the Tomcat 7 version?

Please confirm that this operation works normally.

  


#Tomcat 7.0.75  jdk 1.7.0.65

  


#server.xml

 

 

  


#There are more than 40 threads with the following stacks:

  


"ajp-apr-7009-exec-111" #10247 daemon prio=5 os_prio=0
tid=0x7fa6b811f000 nid=0x2f51 waiting on condition [0x7fa6aa7b8000]

java.lang.Thread.State: TIMED_WAITING (parking)

at sun.misc.Unsafe.park(Native Method)

- parking to wait for  <0x83769178> (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)

at
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)

at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitN
anos(AbstractQueuedSynchronizer.java:2078)

at
java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)

at
org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:86)

at
org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:32)

at
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1066
)

at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11
27)

at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6
17)

at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.ja
va:61)

at java.lang.Thread.run(Thread.java:745)


These are thread idle in the thread pool.


Tomcat 8.0.44 jdk 1.8.0.131

  


#server.xml

 

 

  


There are more than 50 threads with the following stacks:

  


"ajp-apr-7009-exec-1083" #19321 daemon prio=5 os_prio=0
tid=0x7fcd1405d800 nid=0x19fe runnable [0x7fcc373f2000]

java.lang.Thread.State: RUNNABLE

at org.apache.tomcat.jni.Socket.recvbb(Native Method)

at
org.apache.coyote.ajp.AjpAprProcessor.readSocket(AjpAprProcessor.java:256)

at
org.apache.coyote.ajp.AjpAprProcessor.read(AjpAprProcessor.java:197)

at
org.apache.coyote.ajp.AbstractAjpProcessor.readMessage(AbstractAjpProcessor.
java:1091)

at
org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcessor.java
:804)

at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(Abstrac
tProtocol.java:684)

at
org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEnd
point.java:2458)

- locked <0xf6bce3a0> (a
org.apache.tomcat.util.net.AprEndpoint$AprSocketWrapper)

at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11
42)

at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6
17)

at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.ja
va:61)

at java.lang.Thread.run(Thread.java:748)



These are threads which are busy from the point of view of the thread 
pool, but what they are doing is waiting for more data to arrive on a 
connection they handle.


So the two groups of threads you have chosen are really in a different 
state, not only Tomcat or Java version wise.


Regards,

Rainer

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



Thread state differences according to Tomcat 7, 8 version.

2018-03-26 Thread 이의준
Hi ! 

English is not my native language; please excuse typing errors.

 

Why is Tomcat not handling requests with 8 versions, but in the RUNNABLE
state, not the TIME_WAITING state of the Tomcat 7 version?

Please confirm that this operation works normally.

 

#Tomcat 7.0.75  jdk 1.7.0.65

 

#server.xml





 

#There are more than 40 threads with the following stacks:

 

"ajp-apr-7009-exec-111" #10247 daemon prio=5 os_prio=0
tid=0x7fa6b811f000 nid=0x2f51 waiting on condition [0x7fa6aa7b8000]

   java.lang.Thread.State: TIMED_WAITING (parking)

   at sun.misc.Unsafe.park(Native Method)

   - parking to wait for  <0x83769178> (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)

   at
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)

   at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitN
anos(AbstractQueuedSynchronizer.java:2078)

   at
java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)

   at
org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:86)

   at
org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:32)

   at
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1066
)

   at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11
27)

   at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6
17)

   at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.ja
va:61)

   at java.lang.Thread.run(Thread.java:745)

 

 

Tomcat 8.0.44 jdk 1.8.0.131

 

#server.xml





 

There are more than 50 threads with the following stacks:

 

"ajp-apr-7009-exec-1083" #19321 daemon prio=5 os_prio=0
tid=0x7fcd1405d800 nid=0x19fe runnable [0x7fcc373f2000]

   java.lang.Thread.State: RUNNABLE

   at org.apache.tomcat.jni.Socket.recvbb(Native Method)

   at
org.apache.coyote.ajp.AjpAprProcessor.readSocket(AjpAprProcessor.java:256)

   at
org.apache.coyote.ajp.AjpAprProcessor.read(AjpAprProcessor.java:197)

   at
org.apache.coyote.ajp.AbstractAjpProcessor.readMessage(AbstractAjpProcessor.
java:1091)

   at
org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcessor.java
:804)

   at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(Abstrac
tProtocol.java:684)

   at
org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEnd
point.java:2458)

   - locked <0xf6bce3a0> (a
org.apache.tomcat.util.net.AprEndpoint$AprSocketWrapper)

   at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11
42)

   at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6
17)

   at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.ja
va:61)

   at java.lang.Thread.run(Thread.java:748)

 

Best regards