cgroup memory.limit_in_bytes : is it VIRT or RES that is limited?

Solution 1:

It applies to the user memory including the file cache.

Check memory.limit_in_bytes here https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/sec-memory.html

memory.limit_in_bytes sets the maximum amount of user memory (including file cache).

Being:

cache: page cache, including tmpfs (shmem), in bytes

rss: anonymous and swap cache, not including tmpfs (shmem), in bytes