Profile Image
prabhat bharati

GC threads are taking high CPU /Load average in linux

as checked in Jstack , GC threads are taking high CPU /Load average in linux.

Please support in understanding the deviation if any in attached report.

 

Thanks 

Prabhat



Report URL - https://gceasy.io/my-gc-report.jsp?p=c2hhcmVkLzIwMjEvMTEvMTYvLS1nY19wdHVwc190eG4ubG9nX0JBS19JU1NVRS0tNi0xNy0xMQ==&channel=WEB

  • fullgc

  • cpuconsumptions

  • gcthreads

  • outofmemoryerror

  • heapdumps

  • loadaverage

  • highcpu

  • linux

Please Sign In or to post your comment or answer

Profile Image

Ankita

Hello Prabhat,

 

 

1. From your report I can see in the above graph your application is suffering from consecutive full GC problem. When a full GC event runs, it pauses the application completely for several seconds and the response time of your application transactions will degrade. 

Here are few recommendations:

 

a. Increase JVM Heap Size:

 

Try to increase JVM Heap Size and study the results.

 

b. Increase JVM Count:


Adding more JVM instances is another solution to this problem. When you add more JVM instances, then traffic volume will get distributed. The amount of traffic volume handled by one single JVM instance will go down. If less traffic volume is sent to a JVM instance, then fewer objects will be created. If fewer objects are created, then you will not run into the consecutive Full GC problems.

Profile Image

Ram Lakshmanan

Hello Prabhat!

 

  As highlighted by ANkita in the above graph, full GCs are running consecutively. These consecutive Full GCs are run by the GC threads. Since they are consecutively running, GC threads CPU consumptions will be spiked up only.

 

 

You might have to capture heap dump & analyze it. Heap dump is a snapshot of memory, which shows all the objects in memory, values contained by those objects, and their references. You can capture heap dump using one of the 7 approaches given here . But an important criteria is: You need to capture the heap dump right before OutOfMemoryError is thrown. If you are going to capture a heap dump, after OutOfMemoryError has occurred, then leaking objects can get garbage collected, and it will become hard (or even impossible) to diagnose the problem. Once heap dumps are captured, you need to import the heap dumps from your production servers to your local machine. From your local machine you can use heap dump analysis tools like jHat, HeapHero, Eclipse MAT to analyze the heap dumps. Here is a video tutorial, which may assist you with it.

 

 

Got something else on mind? Post Your Question

Not the answer you're looking for? Browse other questions tagged
  • fullgc

  • cpuconsumptions

  • gcthreads

  • outofmemoryerror

  • heapdumps

  • loadaverage

  • highcpu

  • linux