1 2 Previous Next 17 Replies Latest reply: Mar 8, 2012 5:18 AM by sreenivas arumilli Go to original post RSS
  • 15. Re: Cpu 100% and GC is running
    sreenivas arumilli Newbie

    Hi,

     

    I changed the JVM setting and able tp see the perfomance of my system was much improved. But still I am having 100% cpu usage with GC.

     

    Our JVM permaters are :

     

    -Dprogram.name=run.sh

    -Dprogram.name=run.sh

    -Xms3872m

    -Xmx3872m

    -Dsun.rmi.dgc.client.gcInterval=3600000

    -Dsun.rmi.dgc.server.gcInterval=3600000

    -XX:NewSize=1278m

    -XX:MaxNewSize=1278m

    -Djava.net.preferIPv4Stack=true

    -XX:MaxPermSize=256m

    -XX:+UseConcMarkSweepGC

    -XX:+CMSClassUnloadingEnabled

    -Djavax.net.ssl.trustStore=/opt/properties/.keystore

    -Djavax.net.ssl.trustStorePassword=changeit

    -Dcom.sun.management.jmxremote.port=8888

    -Djava.rmi.server.hostname=192.168.100.39

    -Dcom.sun.management.jmxremote.ssl=false

    -Dcom.sun.management.jmxremote

    -XX:+PrintGCDetails

    -Xloggc:/opt/gc.log

    -XX:+UseTLAB

    -XX:+UseParNewGC

    -XX:ParallelGCThreads=4

    -Xss256k

    -Djava.net.preferIPv4Stack=true

    -Djava.endorsed.dirs=/opt/jboss-4.2.3.GA//lib/endorsed

     

    We observered GC logs and found the below lines are causing CPU 100% usage.

     

    25074.643: [GC [1 CMS-initial-mark: 1349040K(2656256K)] 1350761K(3963712K), 0.0072300 secs]

    25074.650: [CMS-concurrent-mark-start]

    25075.310: [CMS-concurrent-mark: 0.659/0.659 secs]

    25075.310: [CMS-concurrent-preclean-start]

    25075.320: [CMS-concurrent-preclean: 0.010/0.010 secs]

    25075.320: [CMS-concurrent-abortable-preclean-start]

    CMS: abort preclean due to time 25076.377: [CMS-concurrent-abortable-preclean: 0.175/1.057 secs]

    25076.391: [GC[YG occupancy: 63977 K (1307456 K)]25076.391: [Rescan (parallel) , 0.1988790 secs]25076.589: [weak refs processing, 0.3584420 secs] [1 CMS-remark: 1349040K(2656256K)] 1413018K(3963712K), 0.5868910 secs]

    25076.978: [CMS-concurrent-sweep-start]

    25077.978: [CMS-concurrent-sweep: 1.000/1.000 secs]

    25077.978: [CMS-concurrent-reset-start]

    25077.986: [CMS-concurrent-reset: 0.008/0.008 secs]

     

     

    Can you suggest why it getting aborted and what we need to do to prevent this.

     

    Arumilli

  • 16. Re: Cpu 100% and GC is running
    Peter Johnson Master

    You will always have 100% CPU for GC because GC is a CPu and memory intensive operation. Once a GC thread gets assigned to a CPU, it will run for its entire quantum because it never breaks for IO or other things that cause regular application threads to give up the CPU. Addtionally, onnce the GC thread is thrown off of the CPU because it quantum expired, it gets right back in the queue thus get assigned a CPU almost immediately.

     

    I do hope that you have 4 cores/CPUs in you box. You should never set GC threads to a higher number than the number of cores/CPUs.

     

    The preclean was aborted due to time restrictions. I would not worry about that, the sweep is what really does the cleaning. This article ijmplies that it is best if the preclean time span is long enough to encompass a minor collection, so you might first determine your typical young gen GC intervaland then pick a CMSMaxAbortablePrecleanTime setting that youu handle 90% of the cases.

     

    Considering how quickly the GC finished, I suspect that you have very little garbage in the tenured generation.

     

    BTW, if you plan on running the server for more than an hour, either increase both of the RMI gcintervals, or set -XX:+DisableExplicitGC

  • 17. Re: Cpu 100% and GC is running
    sreenivas arumilli Newbie

    Thanks for your response.I gone on vacation and cam back yesterday..

    I have taken the thread dumps before and after the thread increase and able to see the followin components are using the threads.

     

    "ajp-192.168.100.40-8009-199" - Thread t@629

       java.lang.Thread.State: TIMED_WAITING on EDU.oswego.cs.dl.util.concurrent.QueuedSemaphore$WaitQueue$WaitNode@5fc784ce

            at java.lang.Object.wait(Native Method)

            at EDU.oswego.cs.dl.util.concurrent.QueuedSemaphore$WaitQueue$WaitNode.doTimedWait(QueuedSemaphore.java:123)

            at EDU.oswego.cs.dl.util.concurrent.QueuedSemaphore.attempt(QueuedSemaphore.java:47)

            at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:181)

            at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:613)

            at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:347)

            at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:330)

            at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:402)

            at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:849)

            at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)

            at atg.service.jdbc.SwitchingDataSource.getConnection(SwitchingDataSource.java:761)

            at atg.adapter.gsa.GSATransaction.getConnection(GSATransaction.java:725)

            at atg.adapter.gsa.GSAItemDescriptor.getConnection(GSAItemDescriptor.java:2364)

            at atg.adapter.gsa.GSAItemDescriptor.executeQuery(GSAItemDescriptor.java:7335)

     

     

    I searched in google but haven't found much information. Anyone has any idea on it.

1 2 Previous Next