Re: LXC Memory Limits wont work

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

 



On 06.08.2018 10:35, Daniel P. Berrangé wrote:
The 'free' command reports what is present in the host, which is distinct
from what's made available to the container. This isn't unique to libvirt
LXC containers - in fact any command that is runnning in a cgroup with
memory controller limits applied will see the same behaviour. Apps can't
assume that 'free' reflects the amount of memory that is available to
them. Instead they need to look at cgroups memory controller that they
are placed under (/proc/self/cgroups tells you where)
I think this is not completely true... I had a similiar problem in the past, and I could get it fixed by using e.g. this in the domains XML:

  <memtune>
    <hard_limit unit='KiB'>4194304</hard_limit>
    <soft_limit unit='KiB'>4194304</soft_limit>
    <swap_hard_limit unit='KiB'>4194304</swap_hard_limit>
  </memtune>

`free` then reports the correct values. Maybe you can give that a try @Markus Raps? Of course make sure to check out the documentation[1] of these config elements to make sure you really want what they do.

Regards
Rene

[1] = https://libvirt.org/formatdomain.html#elementsMemoryTuning

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users




[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux