kvm version: QEMU emulator version 1.1.2 (qemu-kvm-1.1.2+dfsg-6+deb7u3, Debian), Copyright (c) 2003-2008 Fabrice Bellard
libvirtd version: libvirtd (libvirt) 0.9.12.3
debian version: 7.5
I'm running multiple VMs on a 16GB RAM machine, all together they use ~9GB RAM.
Every now and then the linux oom killer comes over and kills a process. I guess it chooses the process using most of the memory - in this case a 6GB Windows VM:
[431215.778365] Out of memory: Kill process 25086 (kvm) score 192 or sacrifice child
IMHO the machine shouldn't be in an OOM Situation as there are ~6.6GB cached memory available. You can see the memory distribution and the resulting oom kill here:
I now have set the oom_adj
for the pid of the kvms to -17
, so the oom-killer won't kill this process.
But I'm still failing to understand why the kernel thinks it has to kill a process and won't go ahead and free some cached memory.
- Can anyone explain why this happens?
- Can you tell me how I can prevent the oom killer from killing my kvm processes without knowing the PID?
tmpfs
, depending how you check it may count as cache/buffer even though it can't be freed short of swapping it.