java 是 PSYoungGen 停止世界事件

java is PSYoungGen a stop the world event

对于我的 java 应用程序/jvm,这些是停止世界事件吗 如果是的话是哪一个。用户系统真实,

[PSYoungGen: 347808K->672K(348160K)] 415832K->68744K(1047552K), 0.0019772 秒] [时间: user=0.03 sys=0.00, real=0.00 秒]

[PSYoungGen: 347808K->640K(348160K)] 415880K->68792K(1 047552K), 0.0018775 秒] [时间: user=0.01 sys=0.01, real=0.00 秒]

[PSYoungGen: 347776K->704K(348160K)] 415928K->68912K(1047552K), 0.0020238 秒] [时间: user=0.02 sys=0.00, real=0.00 secs]

谢谢

大多数垃圾收集器实现的集合都会执行 "stop the world" 个事件。

例如,JVM 1.7 上使用的默认垃圾收集器实现是 G1,您可以在 Oracle documentation 中读到它会 "stop the world" 暂停新生代收集:

The G1 GC has a pause time-target that it tries to meet (soft real time). During young collections, the G1 GC adjusts its young generation (eden and survivor sizes) to meet the soft real-time target.

真正的区别在于停止已经过去了多长时间。您在这里有其他回复:How to read a verbose:GC output?


编辑:我精确了 "most of" GC 实现(不是全部)并用 G1 示例进行了说明。