My server is using 1.8.0_92 on CentOS 6.7, gc param is '-Xms16g -Xmx16g -XX:+UseG1GC'. So the default InitiatingHeapOccupancyPercent is 45, G1HeapWastePercent is 5 and G1MixedGCLiveThresholdPercent is 85. My server's mixed gc starts from 7.2GB, but it clean less and less, finally old gen keeps larger than 7.2GB, so it's always try to do concurrent mark. Finally all heap are exhausted and full GC occurred,. After full gc, old gen used is under 500MB.
https://i.stack.imgur.com/mzDlu.png I dumped the heap from another machine with -Xmx4G.I used lettuce as my redis client, and it has tracking featured using LatencyUtils. It make LatencyStats(which contains some long[] with near 3000 elements) instances weak referenced every 10 mins(Reset latencies after publish is true by default, https://github.com/mp911de/lettuce/wiki/Command-Latency-Metrics). So it will make lots of WeakReference of LatencyStats after long time. Before Full GC. https://i.stack.imgur.com/KRdOL.png https://i.stack.imgur.com/wboak.png https://i.stack.imgur.com/vGnmF.png After Full GC. https://i.stack.imgur.com/P0XJV.png Currently I don't need tracking from lettuce, so just disable it and it doesn't have full gc anymore. But want to know why mixed gc doesn't clear them. And I tried in local environment too, but can't reproduce at local environment. Thanks.
_______________________________________________ hotspot-gc-use mailing list hotspot-gc-use@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use