[lxc-users] How to set the resource limits to a container

Guido Jäkel G.Jaekel at DNB.DE
Fri Mar 21 16:26:24 UTC 2014


Dear Andy,

This will "put pressure on the memory". If something can be given free (like the file cache), it will. Then, if it's still over the limit, either the Linux OOM thread will kill processses. Or the container will freeze, if you configure it with memory.oom_control = 1

RFTM at https://www.kernel.org/doc/Documentation/cgroups/memory.txt ;)

greetings

Guido

On 2014-03-21 16:28, Andy Johnson wrote:
> Hello, LXC-users,
> 
> What happens if you try to set the memory to a value which is lower than
> the running container currently consumes ? can this create any
> problems ? or is it always handled with no issues ?
> 
> Regards,
> Andy
> 
> 
> On Fri, Mar 21, 2014 at 11:42 AM, Andreas Laut <andreas.laut at spark5.de> wrote:
>> The memory limit is set through cgroup.
>> You can change this through lxc-cgroup -n [Container] memory.limit_in_bytes
>> = XG
>> Or echo into the /sys/fs/cgroup/lxc/[Container] memory.limit_in_bytes
>> (and change this in container config: lxc.cgroup.memory.limit_in_bytes = XG)
>>
>> Regards,
>> Andreas
>>
>> Am 21.03.2014 10:28, schrieb Mingjiang Shi:
>>
>> Hi there,
>> My application in the container is running out of memory.  How to set the
>> resource such as memory limits to a container so that it gets more memory?
>> I googled a lot but didn't find straightforward tutorials. Thanks!
>>
>> --
>> Thanks
>> -Mingjiang
>>
>>
>> _______________________________________________
>> lxc-users mailing list
>> lxc-users at lists.linuxcontainers.org
>> http://lists.linuxcontainers.org/listinfo/lxc-users
>>
>>
>>
>> _______________________________________________
>> lxc-users mailing list
>> lxc-users at lists.linuxcontainers.org
>> http://lists.linuxcontainers.org/listinfo/lxc-users
> _______________________________________________
> 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