求助>JDK 14 中 Garbage first 的MaxGCPauseTimeMillis 和MaxGCPauseMillis 有啥区别?>
4回复

JDK 14 中 Garbage first 的MaxGCPauseTimeMillis 和MaxGCPauseMillis 有啥区别?



JDK 14 中 Garbage first 的MaxGCPauseTimeMillis 和MaxGCPauseMillis 有啥区别?

128 阅读
请先登录,再评论

回复列表

官方文档的解释是:
G1 always sizes the young generation at the end of a normal young collection for the next mutator phase. This way, G1 can meet the pause time goals that were set using -XX:MaxGCPauseTimeMillis and -XX:PauseTimeIntervalMillis based on long-term observations of actual pause time. It takes into account how long it took young generations of similar size to evacuate. This includes information like how many objects had to be copied during collection, and how interconnected these objects had been.