[lxc-users] Does memory limit affects file system cache?

Wolfgang Bumiller w.bumiller at proxmox.com
Tue Jan 26 14:02:01 UTC 2016


> On January 26, 2016 at 2:21 PM Eax Melanhovich <afiskon at devzen.ru> wrote:
> 
> 
> Hello.
> 
> Lets say I would like to test how PostgreSQL behaves under some
> circumstances in particular when some table does not fit into memory.
> The problem is I have 16 Gb of RAM so to test this I have to create
> quite a large table. Can I just set:
> 
> lxc.cgroup.memory.limit_in_bytes = 1024M
> 
> ... instead? Will it guarantee that database will not be cached by
> host's file system?

I'd like to know more details about this, too. As far as I can tell
`kmem.limit_in_bytes` can affect the file system cache, and is
pretty devastating when the container runs on ZFS as it seems to
count the ZFS ARC and sooner or later starts OOM-killing the container.
This does not happen when only using 'memsw.*'.



More information about the lxc-users mailing list