Re: memory.limit_in_bytes: systemd vs lxc
> From: jode...@gmail.com > To: Harald Dunkel> debian-user@lists.debian.org > On 25-07-17, Harald Dunkel wrote: >> Hi Dejan, >> >> On Mon, 24 Jul 2017 09:43:30 +0200 >> Dejan Jocic wrote: >> >> > On 24-07-17, Harald Dunkel wrote: >> > > >> > > Apparently systemd ignores the restricted memory. How can I tell >> > > systemd to keep the limits? >> > > >> > > >> > > Every helpful comment is highly appreciated >> > > Harri >> > > >> > >> > Never did it myself, but perhaps this can help you: >> > >> > https://www.freedesktop.org/software/systemd/man/systemd.exec.html#LimitCPU= >> > >> > >> Thanx for the pointer, but I think this is a misunderstanding. >> I want systemd to keep(!) the limits, not have another local >> config file. Systemd should not be allowed to extend the limits >> bound to the container, no matter what. >> >> >> Regards >> Harri > Well, I agree with you, it should not. But other solution would be to > file bug against systemd. Hopefully, you will get answer other then "it > is feature, not bug" :P But is this feature trully unlimited other than by your hardware?
Re: memory.limit_in_bytes: systemd vs lxc
On 25-07-17, Harald Dunkel wrote: > Hi Dejan, > > On Mon, 24 Jul 2017 09:43:30 +0200 > Dejan Jocicwrote: > > > On 24-07-17, Harald Dunkel wrote: > > > > > > Apparently systemd ignores the restricted memory. How can I tell > > > systemd to keep the limits? > > > > > > > > > Every helpful comment is highly appreciated > > > Harri > > > > > > > Never did it myself, but perhaps this can help you: > > > > https://www.freedesktop.org/software/systemd/man/systemd.exec.html#LimitCPU= > > > > > Thanx for the pointer, but I think this is a misunderstanding. > I want systemd to keep(!) the limits, not have another local > config file. Systemd should not be allowed to extend the limits > bound to the container, no matter what. > > > Regards > Harri Well, I agree with you, it should not. But other solution would be to file bug against systemd. Hopefully, you will get answer other then "it is feature, not bug" :P
Re: memory.limit_in_bytes: systemd vs lxc
Hi Dejan, On Mon, 24 Jul 2017 09:43:30 +0200 Dejan Jocicwrote: > On 24-07-17, Harald Dunkel wrote: > > > > Apparently systemd ignores the restricted memory. How can I tell > > systemd to keep the limits? > > > > > > Every helpful comment is highly appreciated > > Harri > > > > Never did it myself, but perhaps this can help you: > > https://www.freedesktop.org/software/systemd/man/systemd.exec.html#LimitCPU= > > Thanx for the pointer, but I think this is a misunderstanding. I want systemd to keep(!) the limits, not have another local config file. Systemd should not be allowed to extend the limits bound to the container, no matter what. Regards Harri
Re: memory.limit_in_bytes: systemd vs lxc
On 24-07-17, Harald Dunkel wrote: > Hi folks, > > I have to restrict memory.limit_in_bytes to 16GByte for my LXC > containers. Problem: The containers based on Stretch and systemd > show > > % for i in $(find /sys/fs/cgroup/memory/lxc/lxc1 -name > memory.limit_in_bytes); do \ > echo $i $(cat $i) \ > done | column -t > /sys/fs/cgroup/memory/lxc/lxc1/memory.limit_in_bytes 17179869184 > /sys/fs/cgroup/memory/lxc/lxc1/user.slice/memory.limit_in_bytes > 9223372036854771712 > /sys/fs/cgroup/memory/lxc/lxc1/init.scope/memory.limit_in_bytes > 9223372036854771712 > /sys/fs/cgroup/memory/lxc/lxc1/system.slice/memory.limit_in_bytes > 9223372036854771712 > > Apparently systemd ignores the restricted memory. How can I tell > systemd to keep the limits? > > > Every helpful comment is highly appreciated > Harri > Never did it myself, but perhaps this can help you: https://www.freedesktop.org/software/systemd/man/systemd.exec.html#LimitCPU=
memory.limit_in_bytes: systemd vs lxc
Hi folks, I have to restrict memory.limit_in_bytes to 16GByte for my LXC containers. Problem: The containers based on Stretch and systemd show % for i in $(find /sys/fs/cgroup/memory/lxc/lxc1 -name memory.limit_in_bytes); do \ echo $i $(cat $i) \ done | column -t /sys/fs/cgroup/memory/lxc/lxc1/memory.limit_in_bytes 17179869184 /sys/fs/cgroup/memory/lxc/lxc1/user.slice/memory.limit_in_bytes 9223372036854771712 /sys/fs/cgroup/memory/lxc/lxc1/init.scope/memory.limit_in_bytes 9223372036854771712 /sys/fs/cgroup/memory/lxc/lxc1/system.slice/memory.limit_in_bytes 9223372036854771712 Apparently systemd ignores the restricted memory. How can I tell systemd to keep the limits? Every helpful comment is highly appreciated Harri