Bug#976190: systemd: LXC memory limits messed up after some time

Michael Biebl biebl at debian.org
Tue Dec 1 14:03:33 GMT 2020


Am 01.12.20 um 14:54 schrieb Michael Biebl:
> Am 01.12.20 um 14:29 schrieb Paul Slootman:
>> Hi,
>>
>> On Tue 01 Dec 2020, Michael Biebl wrote:
>>>>
>>>> root at dns:~# free
>>>>                 total        used        free      shared  
>>>> buff/cache   available
>>>> Mem:        1048576       41660     1006784       48124         
>>>> 132     1006784
>>>> Swap:             0           0           0
>>>>
>>>>
>>>> After some time, I have noticed that they are no longer correct; in 
>>>> fact
>>>> they are wildly wrong:
>>>>
>>>> root at dns:~# free
>>>>                 total        used        free      shared  
>>>> buff/cache   available
>>>> Mem:    9007199254740991      598372 9007199254108535       
>>>> 85652       34084 9007199254108535
>>>> Swap:             0        1692       -1692
>>>>
>>>
>>> I suppose, this is from within the container?
>>
>> Yes, correct
>>
>>> How do you apply/setup the limits?
>>
>> This is in the libvirt container definition:
>>
>> <domain type='lxc'>
>>    <name>dns</name>
>>    <uuid>32bd6117-0082-49eb-b622-87e1de716c88</uuid>
>>    <memory unit='KiB'>1048576</memory>
>>    <currentMemory unit='KiB'>1048576</currentMemory>
>>    <memtune>
>>      <hard_limit unit='KiB'>1048576</hard_limit>
>>      <soft_limit unit='KiB'>1048576</soft_limit>
>>      <swap_hard_limit unit='KiB'>1048576</swap_hard_limit>
>>    </memtune>
>>    <vcpu placement='static'>1</vcpu>
> 
> Let's loop in the the libvirt maintainers.

As well as the lxc maintainers.

> If I understand Paul correctly (and read the journal log correctly), the 
> memory limits applied by libvirt are lost once a `systemctl 
> daemon-reload` is happening. I'm not really familiar how libvirt 
> interacts with lxc/systemd, so your input would be welcome here.



More information about the Pkg-systemd-maintainers mailing list