-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
请教一下,k8s内使用zgc算法的java应用wss远大于rss的原因 #5
Comments
请问这个问题解决了吗? |
同问,这个最后有定位到问题原因吗 |
1 similar comment
同问,这个最后有定位到问题原因吗 |
根本问题ZGC使用Java堆的3个视图(“marked0”,“marked1”,“remapped”),即3种不同“颜色”的堆指针和同一个堆的3个虚拟内存映射。因此,操作系统可能会报告 3 倍大的内存使用量 |
同问,k8s内使用zgc,pod内存跟zgc堆内存如何配置 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
现象描述
作者你好,我们有个java应用使用了zgc算法后,k8s监控看起来比较奇怪,wss将近是rss的3倍关系,有时应用还被k8s oomkiller的。rss = 725MB,wss=4.25GB
在看了你的书,内存管理一章后,猜测是multi-mapping导致的。
通过观察, wss 大概等于 total_cache + total_rss - total_inactive_file, 然后又通过smem查看内存映射情况
Note: linux里的RSS跟k8s的rss应该不一样
看到上面linux里的mapped_file跟/memfd:java_heap 占用比较接近,猜测是zgc的内存映射, 不清楚怎么验证。
问题
The text was updated successfully, but these errors were encountered: