admin管理员组文章数量:1318979
For a Java 21 application with following resource definitions:
resources:
limits:
cpu: "2"
ephemeral-storage: 500Mi
memory: 2500Mi
requests:
cpu: 500m
memory: 2500Mi
I've come to realize that the InitialRAMPercentage flag has absolutely no effect on setting the initial heap size when using G1GC(default) with -XX:InitialRAMPercentage=50.0 -XX:MaxRAMPercentage=80.0
flags:
purple: max heap, orange: committed heap, green: used heap
Whereas using SerialGC, the InitialRAMPercentage works as expected with -XX:+UseSerialGC -XX:InitialRAMPercentage=50.0 -XX:MaxRAMPercentage=80.0
flags:
blue: max heap, green: committed heap, pink: used heap
I looked all over the JVM docs but couldn't find anything that talks about InitialRAMPercentage not working with G1GC, as well as reading the section of the JVM that sets the initial heap size from the argument: .cpp#L1661C7-L1661C22
If you have any insights into why this might be happening and the reasoning behind it, I would greatly appreciate your input!
本文标签: javaWhy does XXInitialRAMPercentage not work with G1GCStack Overflow
版权声明:本文标题:java - Why does -XX:InitialRAMPercentage not work with G1GC? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742056801a2418346.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论