On 3/10/16 2:09 PM, Christopher Schultz wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rallavagu,

On 3/10/16 4:02 PM, Rallavagu wrote:
On 3/10/16 11:54 AM, Christopher Schultz wrote:
Are you sure you have matched-up the correct thread within the
JVM that is using all that CPU?

How are you measuring the CPU usage?

It would the ID output from "top -H" mapping to "Native ID" in
thread dump.

My version of 'top' (Debian Linux) doesn't show thread ids. :(

I seem to recall having to do some backflips to convert native thread
id to Java thread id. Can you explain what you've done to do that?

A typical top -H shows the following

top - 11:40:11 up 190 days,  1:24,  1 user,  load average: 5.74, 6.09, 5.78
Tasks: 759 total,   4 running, 755 sleeping,   0 stopped,   0 zombie
Cpu(s): 18.4%us, 1.6%sy, 0.0%ni, 79.5%id, 0.1%wa, 0.0%hi, 0.5%si, 0.0%st
Mem:   8057664k total,  7895252k used,   162412k free,    63312k buffers
Swap:  2064380k total,   199452k used,  1864928k free,  2125868k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
15648 tomcat    20   0 9649m 4.8g 4520 R 87.3 62.6   7:24.24 java
21710 tomcat    20   0 9649m 4.8g 4520 R 79.8 62.6   5:44.99 java
21694 tomcat    20   0 9649m 4.8g 4520 S 74.3 62.6   5:39.40 java
 7889 tomcat    20   0 9649m 4.8g 4520 S 29.7 62.6   4:24.44 java
 7878 tomcat    20   0 9649m 4.8g 4520 S 27.8 62.6   4:36.82 java
21701 tomcat    20   0 9649m 4.8g 4520 S 26.0 62.6   5:49.83 java

After taking thread dump, I used Threadlogic which will show Native-ID as column which corresponds to PID shown above.

https://java.net/projects/threadlogic

This way it helps to determine the thread that might potentially causing high cpu.


Can you post your <Connector> and/or <Executor> configuration?

<Connector port="28080" protocol="HTTP/1.1" URIEncoding="UTF-8"
maxThreads="500" connectionTimeout="20000" redirectPort="28443" />

Okay, so you are using the default (BIO) connector with no special
configuration. I see you are running Tomcat 7.0.47. Could you please
re-test with latest 7.0.68? Your version is 2.5 years old and there
may be a performance bug fixed.

Sure.


- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlbh8LQACgkQ9CaO5/Lv0PA89wCdHBDkMdKa/9JkNLGY80Ygrl0/
NpkAoL5kQ8cx/Qr9WcOpdHw3DxvurcrD
=Ckbq
-----END PGP SIGNATURE-----

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


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

Reply via email to