简体   繁体   中英

Why am I getting high `Ref Proc` times while using G1GC

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM