最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Why is the MaxHeapSize of my Java app in a Kubernetes container 20GB less than I had expected? - Stack Overflow

programmeradmin2浏览0评论

I have a Tomcat container with a memory request of 62000Mi. The JAVA_OPTS environment variable contains -XX:InitialRAMPercentage=50.0 and -XX:MaxRAMPercentage=80.0.

I was expecting the MaxHeapSize to be 80% of the memory request so ~50GB however the actual MaxHeapSize is ~30GB so I am missing ~20GB.

What could be the reason(s) that I don't get the expected MaxHeapSize? Is it feasible to use MaxRAMPercentage on Kubernetes, or should I stick to Xmx?

This is on Java 11. The Kubernetes worker node has 64GB memory and is hosted on VMWare with dynamic memory allocation.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论