From: Dmitry Konishchev <konishchev@gmail.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] CPU consumption optimization of 'qemu-img convert' using bdrv_is_allocated()
Date: Wed, 15 Jun 2011 17:14:47 +0400 [thread overview]
Message-ID: <BANLkTik65UFNMu9YfjEwX_YAaZqwEJMHxA@mail.gmail.com> (raw)
In-Reply-To: <BANLkTintuq_dGCdVQoVUwfyJo8-FrT7Q-Q@mail.gmail.com>
On Wed, Jun 15, 2011 at 4:02 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> We need to fully understand performance before applying optimizations
> on top. Otherwise it is possible to paper over a problem while
> leaving the root cause unsolved. Avoiding lseek(2) is very important,
> not just for qemu-img but also for running VMs. lseek(2) should only
> be invoked if the image is growable/removable.
>
> When I run a VM from a virtio-blk raw image I see no lseek(2) calls.
>
> On the host:
> strace -p $pid_of_qemu -f
>
> Inside the guest:
> dd if=/dev/vda of=/dev/null iflag=direct
>
> I see pread(2) from the posix-aio-compat.c worker threads but no
> lseek(2). The total_sectors cached value is being used.
>
> Does strace(1) show lseek(2) on your host?
No, I don't see lseek() in the strace output. But in the other hand I
see that bdrv_get_geometry() uses bdrv_getlength() which is
implemented using lseek() in block/raw-posix.c...
May be I'am mistaken about lseek(), but I get 9% slower version if
disable caching.
--
Дмитрий Конищев (Dmitry Konishchev)
mailto:konishchev@gmail.com
next prev parent reply other threads:[~2011-06-15 13:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-08 14:50 [Qemu-devel] [PATCH] CPU consumption optimization of 'qemu-img convert' using bdrv_is_allocated() Dmitry Konishchev
2011-06-13 8:26 ` Stefan Hajnoczi
2011-06-13 9:13 ` Dmitry Konishchev
2011-06-14 7:43 ` Dmitry Konishchev
2011-06-14 15:58 ` Stefan Hajnoczi
2011-06-15 7:38 ` Dmitry Konishchev
2011-06-15 8:39 ` Stefan Hajnoczi
2011-06-15 9:50 ` Dmitry Konishchev
2011-06-15 12:02 ` Stefan Hajnoczi
2011-06-15 13:14 ` Dmitry Konishchev [this message]
2011-06-15 13:33 ` Stefan Hajnoczi
2011-06-15 13:37 ` Dmitry Konishchev
2011-06-15 13:57 ` Stefan Hajnoczi
2011-06-16 8:10 ` Dmitry Konishchev
2011-06-17 7:25 ` Stefan Hajnoczi
2011-06-15 10:14 ` Dmitry Konishchev
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=BANLkTik65UFNMu9YfjEwX_YAaZqwEJMHxA@mail.gmail.com \
--to=konishchev@gmail.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).