From: Steve Kemp <steve@bytemark.co.uk>
To: kvm@vger.kernel.org
Subject: How to diagnose memory leak in kvm-qemu-0.14.0?
Date: Wed, 18 May 2011 17:44:30 +0100 [thread overview]
Message-ID: <20110518164429.GA20927@bytemark.co.uk> (raw)
I'm running the most recent release of KVM, version 0.14.0
on a host kernel 2.6.32.15, and seem to be able to trigger
a leak of memory pretty easily.
Inside a guest the following one-liner will cause the KVM
process on the host to gradually increase its memory
consumption:
while true; do
wget http://mirror.bytemark.co.uk/misc/test-files/500M; cp 500M new; rm 500M new; sleep 10 ;
done
The guest is launched using loopback files:
"/opt/kvm/bin/qemu-system-x86_64 -m 500 -drive
file=/machines/kvm6/jail/root_fs,if=virtio,cache=off -drive
file=/machines/kvm6/jail/swap_file,if=virtio,boot=off -net
nic,macaddr=fe:ff:00:00:5a:cb,model=virtio -net
tap,ifname=tap_kvm6,script=no -pidfile /var/kvm/kvm6.pid -name kvm6
-serial /dev/tty -no-reboot -monitor
unix:/var/kvm/kvm6.mon,server,nowait -kernel
/machines/kvm6/jail/linux -append root=/dev/vda clocksource=acpi_pm
notsc console=tty0 console=ttyS0,115200n8 -nographic -boot c
"
So we're using an external code, and the virtio for both block
and NIC. Using e1000, rtl8139, or virtio for the NIC results in the
same leak.
top shows this:
23074 kvm6 20 0 656m 515m 1060 S 0.0 0.8 13:10.79 qemu-system-x86
So 656Mb virt, 515Mb resident, and over time the virtual memory
increases significantly.
Should I be blaming KVM for this leak? Or is it possible it is either
the host or the guest kernels? Any assistance in tracking down the
leak is most welcome - even vague hints.
If helpful I'd be happy to share logins to either a host or a leaky
guest, or both.
Steve Kemp
--
Bytemark Hosting
http://www.bytemark.co.uk/
phone UK: 0845 004 3 004
Dedicated Linux hosts from 15ukp ($30) per month
next reply other threads:[~2011-05-18 17:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-18 16:44 Steve Kemp [this message]
2011-05-19 8:40 ` How to diagnose memory leak in kvm-qemu-0.14.0? Stefan Hajnoczi
2011-05-19 8:50 ` Stefan Hajnoczi
2011-05-19 11:00 ` Steve Kemp
2011-05-19 11:57 ` Steve Kemp
2011-05-20 11:01 ` Stefan Hajnoczi
2011-05-20 11:47 ` Steve Kemp
2011-05-20 13:16 ` Stefan Hajnoczi
2011-05-20 13:47 ` Steve Kemp
2011-05-20 14:32 ` Stefan Hajnoczi
2011-05-20 14:52 ` Steve Kemp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110518164429.GA20927@bytemark.co.uk \
--to=steve@bytemark.co.uk \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.