[lxc-users] Container Memory Monitoring

Christoph Mitasch cmitasch at thomas-krenn.com
Fri Apr 4 07:15:06 UTC 2014

Hello Serge,

thanks for feedback regarding the library. Is any development code for the library already available?

One more general question regarding memory limitation with containers.

Since memory.failcnt also fails when Page Cache fills up the assigned memory, what is the recommended way to limit memory for a container?

Is disk-based swap space used as soon as memory.limit_in_bytes is reached?
For me it would make more sense to free up Page Cache before writing memory out to disk.


----- Ursprüngliche Mail -----
> Von: "Serge Hallyn" <serge.hallyn at ubuntu.com>
> An: "LXC users mailing-list" <lxc-users at lists.linuxcontainers.org>
> Gesendet: Donnerstag, 3. April 2014 19:27:55
> Betreff: Re: [lxc-users] Container Memory Monitoring
> Quoting Christoph Mitasch (cmitasch at thomas-krenn.com):
> > Hello,
> > 
> > I've tested the Nagios/Icinga Plugin check_lxc_memory.py.
> > https://github.com/bmiklautz/lxc-memory-utils/blob/master/check_lxc_memory.py
> > 
> > I found out that the cgroup file memory.usage_in_bytes also takes the used
> > page cache into account.
> > Also the memory.failcnt file reports a failcnt as soon as the sum of RSS
> > and page cache memory exhausts the memory.limit_in_bytes.
> > Therefore the failcnt doesn't make too much sense for me at the moment.
> > 
> > What is the recommended way to monitor memory usage of a container?
> > 
> > memory.stat would give information about used page_cache, so that could be
> > a possibility.
> > https://www.kernel.org/doc/Documentation/cgroups/memory.txt
> > 
> > Any news on /proc FUSE/virtualization?
> That probably won't happen.  Someone was going to start writing a
> library which could be used to get this information "from all the
> right sources" so that users could all use the common library instead
> of re-inventing the wheel.
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users

More information about the lxc-users mailing list