Reputation: 571
I am using G1GC for number of java applications I have. When using default GC configurations for G1GC (vendor: Oracle), I almost always notice very high (anywhere between 5 sec to 70 sec) Ref Proc
times mostly during young generation evacuation.
I know that I can easily fix it using -XX:+ParallelRefProcEnabled
. I thought I can trust JVM to do the right thing for me for trivial applications. What am I missing here?
Upvotes: 1
Views: 700
Reputation: 43042
Possibly because your application or one of its dependencies uses finalizers (direct byte buffers and some IO/native binding objects do) or soft/weak/phantom references and creates them at a high rate.
You could try taking a heap dump and see which objects that are reachable but not strongly reachable exist on the heap.
Upvotes: 3