年轻一代中的G1 GC是否停止了应用程序
我们使用Corretto Java并使用G1 GC。
据我所知,GC算法确实停止了应用程序,而在某个时候进行完整的GC并不是年轻一代,因为它发生的频率更高。
但是一些文章提到,G1 GC在GC开始时也停止了年轻一代的应用程序,以便在立即恢复应用程序之前进行一些快速的簿记。是真的吗?因为在此期间,我们的健康检查失败了,我们的自动扩展组触发了缩放量表。
年轻一代中的G1 GC确实停止了应用程序吗?
We use corretto java and using G1 gc.
As far as I know, the gc algorithms do halts the application while doing full gc for sometime not while young generation as it happens more frequently.
But some of articles mentioned that G1 gc halts the application in young generation too at the beginning of the GC to do some quick bookkeeping before it immediately resumes the application. Is it true ? Because during this time our health check failed and our Auto scaling group triggered scale out event.
Is it true that G1 gc in young generation halts the application ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
G1 Young阶段包括两个停止世界步骤(标记和清理)。它还包括一些并发的步骤(并发启动)。
因此,我会回答您的问题:是的,年轻的收集停止/停止了您的应用程序。
You can check G1 specifics
G1 Young phase includes two stop-the-world steps (marking and cleanup). It also includes some steps (Concurrent Start) which are concurrent.
So I would answer your question: yes, Young Collection halts/stop-the-world your application.
You can check G1 specifics here
我认为吉尔·特内(Gil Tene)的演讲真的很有用: https://vimeo.com/3747555640
在45:30左右,他们开始对包括G1 GC在内的共同(遗产)收集器进行分类,他们形容为:
I think this talk from Gil Tene is really useful: https://vimeo.com/374755640
Around 45:30 they start classifying common (legacy) collectors including G1 GC which they describe as: