Usually I do the following:

 

i.                     Check for full garbage collection events using ‘jstat –gcutil ‘

ii.                   Take several  thread dumps 15 seconds apart  - use Thread Dump Analyser to look for locked threads and also look for busy threads top –H –p pid

 

 

 

From: jboss-user-bounces@lists.jboss.org [mailto:jboss-user-bounces@lists.jboss.org] On Behalf Of Amol Walanj
Sent: 08 May 2012 10:03
To: User development
Subject: [jboss-user] [Performance Tuning] - Re: High CPU Utilization

 

JBoss Community

Re: High CPU Utilization

created by Amol Walanj in Performance Tuning - View the full discussion


Hi , Thanks for quick reply.

Its during the runtime when we fired the bulk orders. (Client with 20 threads)

 

What I had observed from jconsole is , the tomcat threads (http-0.0.0.0-8080-*) are taking more time to complete.

 

 

 

I had tried to find the top 5 threads consuming the CPU during this run using the shell script.

 

The Partial O/P is as follows :

 

  PID USER 

PR  NI  VIRT  RES  SHR S %CPU %MEM

TIME+  COMMAND                                                    

11935 sis  

15   0 6342m 3.7g  11m S 29.5 47.0   0:10.37 java                                                       

11681 sis  

15   0 6342m 3.7g  11m R 25.6 47.0   0:27.65 java                                                       

11662 sis  

15   0 6342m 3.7g  11m S 23.6 47.0   0:31.89 java                                                       

11682 sis  

15   0 6342m 3.7g  11m S 21.6 47.0   0:31.34 java                                                       

11663 sis  

15   0 6342m 3.7g  11m S 21.6 47.0   0:33.84 java

 

Pasting here the thread Dump for one of the PID.The others dump also shows the same dump.

 

 

========> Java LWP: 11681 - Native Thread ID=2da1

"http-0.0.0.0-8080-15" daemon prio=10 tid=0x00002aaac0877000 nid=0x2da1 waiting on condition [0x0000000042e7f000]

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

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

        - parking to wait for  <0x0000000746df1920> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)

        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:156)

        at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811)

        at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:842)

        at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1178)

        at java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:186)

        at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:262)

        at org.jboss.security.plugins.JBossAuthorizationManager.internalAuthorization(JBossAuthorizationManager.java:470)

        at org.jboss.security.plugins.JBossAuthorizationManager.authorize(JBossAuthorizationManager.java:125)

        at org.jboss.security.plugins.javaee.WebAuthorizationHelper.hasUserDataPermission(WebAuthorizationHelper.java:201)

        at org.jboss.web.tomcat.security.JBossWebRealm.hasUserDataPermission(JBossWebRealm.java:643)

        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:461)

        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)

        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

        at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:905)

        at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:592)

        at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2036)

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

 

 

Thanks,

Amol

Reply to this message by going to Community

Start a new discussion in Performance Tuning at Community

 





This e-mail from Practical Law Company (http://www.practicallaw.com) is subject to our terms of use (http://www.practicallaw.com/9-103-0884). Information about our companies: Practical Law Company Limited. Registered in England and Wales. Registered Number: 02889191. Registered Office: 19 Hatfields, London SE1 8DJ. Telephone: +44(0)20 7202 1200.
Practical Law Company, Inc. Incorporated in Delaware, USA. Corporate Office: 747 Third Avenue, 36th Floor, New York, NY 10017. Telephone: +1(646) 562-3400.