user1550159
user1550159

Reputation: 1267

JAVA Garbage collection not running

We have a application Running on java 1.8 with high heap utilization on production servers and found that Major GC is not happening at all. Same configurations have been applied to a non prod machine, but Major GC runs every one hour there. What triggers Major GC, does better H/W (More CPU's) on prod is causing any issues ?

java.args=-server -Xms3072m -Xmx3072m -XX:NewSize=1024m -XX:MaxNewSize=1024m -XX:MaxMetaspaceSize=1024m -XX:NewRatio=4 -Dsun.io.useCanonCaches=false -XX:+UseParallelGC -XX:+UseAdaptiveSizePolicy -XX:-CreateMinidumpOnCrash 

Thanks in Advance.

Upvotes: 1

Views: 3477

Answers (2)

Deven
Deven

Reputation: 446

I can see you are using Parallel collector from the settings you shared, This will trigger a major collection each time your old generation becomes full. Memory consumed is a function of workload so if you have same workload on both environment you should get similar number of major collections for same heap sizes in both environment.

Upvotes: 0

Witold Kaczurba
Witold Kaczurba

Reputation: 10505

Oracle / Java never guarantees that GC would run. That is the biggest issue about Garbage Collection that you cannot predict its behavior

Upvotes: 1

Related Questions