Experience with JDK 1.6.x G1 (“Garbage First”)

岁酱吖の 提交于 2019-12-05 20:43:35

问题


I'd like to know what are the experiences with G1 garbage collector in newest JDK? I see NullPointerException thrown in my program, although code didn't change and behave correctly in earlier JDKs.


回答1:


I've been running jEdit using:

-Xmx192M -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC

for the last couple of days on windows. Haven't experienced anything going wrong or misbehaving.

I also tried running Intellij using the G1 GC, it didn't fair so well. It lasted a couple of hours before crashing in a big pile of mess, a bit optimistic maybe.




回答2:


A garbage collector will only impact the performance of your application, not its correctness. I've been using it for Eclipse, just for fun, and seemed stable.

I would look elsewhere for the source of the exceptions.




回答3:


I tried and experienced no exceptions. But performance of our server dropped about 30%.



来源:https://stackoverflow.com/questions/986974/experience-with-jdk-1-6-x-g1-garbage-first

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