How can I lower the weak ref processing time during GC?

依然范特西╮ 提交于 2019-12-03 06:21:02

I found this message in the "hotspot-gc-use" mailing list.

In short, try the -XX:+ParallelRefProcEnabled switch.


UPDATE

I found a better explanation in Jon Masamitsu's Weblog:

6) Parallel reference processing in the low pause collector.

For an application that uses Reference objects extensively, the GC work to process the Reference objects can be noticeable. It's not necessarily worse in the low pause collector than in the other collects, but it hurts more (because we're trying to keep the pauses low). Parallel reference processing is available for the low pause collector but is not on by default. Unless there are tons of Reference Objects, doing the reference processing serially is usually faster. Turn it on with the flag -XX:+ParallelRefProcEnabled if you make extensive use of Reference Objects (most applications don't).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!