Docker Warning on Cgroup Swap Limit, Memory.Use_Hierarchy

What does docker mean when it says Memory limited without swap

Docker daemon relies on the following virtual files to implement memory and swap limits:

/sys/fs/cgroup/memory/memory.limit_in_bytes
/sys/fs/cgroup/memory/memory.memsw.limit_in_bytes

If your kernel does not support swap memory limit, the second file won't be there, and docker run won't impose any limitations on the use of the swap space. That way the container is even allowed to use more swap than the -m, --memory setting, as if --memory-swap had been set to -1. Obviously, the container can't use more swap space than you have configured on your system.

However, the warning message is also trying to say that option -m, --memory will still take effect, and the maximum amount of user memory (including file cache) will be set as intended.


The mentioned cgroup mount point may differ, consult /proc/self/mounts.

Cgroup swap accounting

I've contacted google and said that it's a problem with the Ubuntu image, which is not fully supported yet by GCE



Related Topics



Leave a reply



Submit