Docker memory limit causes SLUB unable to allocate with large page cache

≯℡__Kan透↙ 提交于 2019-12-02 21:35:11

java 10.0.1 2018-04-17

You should try with a more recent version of java 10 (or 11 or...)

I mentioned in "Docker support in Java 8 — finally!" last May (2019), that new evolutions from Java 10, backported in Java 8, means Docker will report more accurately the memory used.

This article from may 2018 reports:

Succes! Without providing any flags Java 10 (10u46 -- Nightly) correctly detected Dockers memory limits.


The OP David confirms in the comments:

The docker - jvm integration is a big improvement in Java 10.
It is really to do with setting sane XMS and the number of processors. These now respect the docker container limits rather than picking up the host instance values (you can turn this feature off using -XX:-UseContainerSupport depending on your use case).

I have not found it helpful in dealing with the page cache though.
The best solution I have found is to disable the docker memory limit, after the container is created if need be.
This is definitely a hack - user beware.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!