[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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=



Reply to: