From: Steve Kemp <steve@bytemark.co.uk>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: kvm@vger.kernel.org
Subject: Re: How to diagnose memory leak in kvm-qemu-0.14.0?
Date: Fri, 20 May 2011 12:47:07 +0100 [thread overview]
Message-ID: <20110520114707.GG27422@bytemark.co.uk> (raw)
In-Reply-To: <BANLkTiks_sGBSnEJ9YhY=wXqn70cvyi-vw@mail.gmail.com>
On Fri May 20, 2011 at 12:01:58 +0100, Stefan Hajnoczi wrote:
> > wget http://mirror.bytemark.co.uk/misc/test-files/500M
> > while true; do cp 500M foo.img; rm foo.img; sleep 2; done
> >
> > "top" shows the virt memory growing to >1gb in under two minutes.
>
> Were you able to track down the culprit?
Yes, or at least confirm my suspicion. The virtio block device
is the source of the leak.
Host kernel: 2.6.32.15
Guest Kernel: linux-2.6.32.23
Leaking case:
opt/kvm2/bin/qemu-system-x86_64 -m 500 \
-drive file=/machines/kvm2/jail/root_fs,if=virtio,cache=off
Non leaking case:
/opt/kvm/current/bin/qemu-system-x86_64 -m 500 \
-drive file=/machines/kvm1/jail/root_fs,cache=off ..
The leak occurs with both KVM 0.12.5 and 0.14.0.
I've had a quick read of hw/virtio-blk.c but didn't see anything
glaringly obvious. I'll need to trace through the code, drink more
coffee, or get lucky to narrow it down further.
Steve Kemp
--
Bytemark Hosting
http://www.bytemark.co.uk/
phone UK: 0845 004 3 004
Dedicated Linux hosts from 15ukp ($30) per month
next prev parent reply other threads:[~2011-05-20 11:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-18 16:44 How to diagnose memory leak in kvm-qemu-0.14.0? Steve Kemp
2011-05-19 8:40 ` 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 [this message]
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=20110520114707.GG27422@bytemark.co.uk \
--to=steve@bytemark.co.uk \
--cc=kvm@vger.kernel.org \
--cc=stefanha@gmail.com \
/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.