[lxc-devel] (no subject)

Daniel Lezcano daniel.lezcano at free.fr
Wed Feb 15 22:52:40 UTC 2012


On 02/12/2012 03:55 PM, Jeff Liu wrote:
> Hi xiaojun,
>
> On 02/12/2012 05:27 PM, MaoXiaoyun wrote:
>
>> Hi:
>>
>>      I search the lxc-devel and find there has been some disscussiones on
>> the requirement of container's quota
>> since 2009. For example, under my scenario,  I first make hole rootfs
>> read only , and then mount some writable dir, such
>> as /var/ /tmp and some other dirs for a container, and I want to
>> limit the quota of this directories, such as 20G.
>> But it looks like this is not support yet, right? If so, is there a
>> workaround way to fill my requirement?
> Looks there is no such feature in LXC userland tools for now, or am I
> missing something?
> Maybe you can write an RFC in detail to list.
>
> Dear LXC developer,
>
> I(from Oracle kernel team) just started a research regarding this kind
> of features.
> In short, something includes:
> 1) Task resource limits (like prlimit64(2)) for container, let LXC
> userland tools/kernel support the maximum open file descriptors, etc..
> if possible.

I am not sure but I think this is supported as part of the "user 
namespace" but this one is still experimental and not used in LXC for 
now. If you are willing to test it, you should just add the 
CLONE_NEW_USER in src/lxc/start.c, in the lxc_spawn function clones_flags.

> 2) Quota support(the max size of file/directory).
>
> I'd like to know if anyone has already been working on them?  or does
> them sounds make sense?

Yes, I remember someone worked on it but had to give up because of a new 
job.

http://article.gmane.org/gmane.linux.kernel/797938/match=

and

http://comments.gmane.org/gmane.linux.kernel.containers/13870

where there are some hints to create a configuration to have quota per 
container.

Thanks
   -- Daniel




More information about the lxc-devel mailing list