#539 huge memory leak (qemu-kvm 0.12.3)

closed
nobody
None
5
2012-10-09
2010-04-19
tgr
No

CPU: Xeon E5450
KVM: qemu-kvm 0.12.3
Host: Debian Squeeze amd64, kernel 2.6.32
Guest: Debian Lenny amd64, kernel 2.6.26
qemu command line below (no helpers like libvirt used)
whether the problem goes away if using the -no-kvm-irqchip or -no-kvm-pit switch: seems unrelated
whether the problem also appears with the -no-kvm switch: load profile of the guest makes running without KVM infeasible

The problem: after 4 days, the kvm process of a guest run with -mem 3072 takes 12 GB VSZ / 9 GB RSS - grows until OOM ("kvm invoked oom-killer" in dmesg).
At that point the guest shows more than 2 GB of free memory.

qemu command line:

kvm -smp 4 -m 3072 -net nic,vlan=0,model=virtio,name=eth0,macaddr=x:x:x:x:x:x -net tap,vlan=0,ifname=tap6 -net nic,vlan=1,model=virtio,name=eth1,macaddr=x:x:x:x:x:x -net tap,vlan=1,ifname=tap7 -drive if=virtio,file=/dev/x/x-rootfs,index=0 -drive if=virtio,file=/dev/x/x-swap,index=1 -name x -nographic -kernel /boot/vmlinuz-2.6.26-2-amd64 -initrd /boot/initrd.img-2.6.26-2-amd64 -append root=/dev/vda console=ttyS0 -echr 2 -serial mon:telnet:localhost:12344,server,nowait -monitor unix:/var/run/kvm-x,server,nowait -daemonize -watchdog i6300esb -watchdog-action reset

(the monitor on both telnet and unix socket is intentional, the one on the socket is only used for sending system_reset and system_powerdown qemu commands).

Discussion

  • trevoro
    trevoro
    2010-05-18

    I am experiencing an identical issue on an AMD Sempron with qemu-kvm 0.12.3.

    We have a few virtual machines running on this host. After a few days this is what the memory utilization looks like for the KVM processes.

    be95ae3e-5f79-11df-b0c0-540001bf0689 1024M: vsz=1241M rss=706M
    3bd6f690-5c65-11df-9fb1-5400013f4a54 512M: vsz=675M rss=466M
    c103e4e4-5e00-11df-94fe-540001fccc62 256M: vsz=1470M rss=301M
    0c068dba-5df8-11df-938c-5400015669e3 256M: vsz=7646M rss=2560M

     
  • Avi Kivity
    Avi Kivity
    2010-05-18

    Should be fixed in qemu-kvm-0.12.4.

     
  • This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).