[Lxc-users] limiting RAM usage and disk space usage

Serge E. Hallyn serge.hallyn at canonical.com
Thu Dec 2 18:10:10 UTC 2010


Quoting Gordon Henderson (gordon at drogon.net):
> On Mon, 29 Nov 2010, Trent W. Buck wrote:
> 
> > Siju George <sgeorge.ml at gmail.com> writes:
> >
> >> 1) how do I limit the RAM usage of a container?
> >
> > In lxc.conf(5):
> >
> >    lxc.cgroup.memory.limit_in_bytes = 256M
> >    lxc.cgroup.memory.memsw.limit_in_bytes = 1G
> >
> >> 2) how do I limit the disk usage of a container ?
> >
> > Ensure the rootfs is a dedicated filesystem (e.g. an LVM LV), and limit
> > its size accordingly.
> 
> Finally, a use for LVM....
> 
> And here was me about to embark on using filesystems in files loopback 
> mounted...

That should also work, just a bit slower, right?

-serge




More information about the lxc-users mailing list