From: Eric Blake <eblake@redhat.com>
To: "Richard W.M. Jones" <rjones@redhat.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org,
Edgar Kaziakhmedov <edgar.kaziakhmedov@virtuozzo.com>
Cc: nsoffer@redhat.com
Subject: Re: [Qemu-devel] Change in qemu 2.12 causes qemu-img convert to NBD to write more data
Date: Wed, 7 Nov 2018 10:42:24 -0600 [thread overview]
Message-ID: <d797ae29-97ba-9c18-68ec-a2943bdf7728@redhat.com> (raw)
In-Reply-To: <20181107121319.GC14842@redhat.com>
On 11/7/18 6:13 AM, Richard W.M. Jones wrote:
> (I'm not going to claim this is a bug, but it causes a large, easily
> measurable performance regression in virt-v2v).
I haven't closely looked at at this email thread yet, but a quick first
impression:
> In qemu 2.12 this behaviour changed:
>
> $ nbdkit --filter=log memory size=6G logfile=/tmp/log \
> --run './qemu-img convert ./fedora-28.img -n $nbd'
> $ grep '\.\.\.$' /tmp/log | sed 's/.*\([A-Z][a-z]*\).*/\1/' | uniq -c
> 193 Zero
> 1246 Write
>
> It now zeroes the whole disk up front and then writes data over the
> top of the zeroed blocks.
>
> The reason for the performance regression is that in the first case we
> write 6G in total. In the second case we write 6G of zeroes up front,
> followed by the amount of data in the disk image (in this case the
> test disk image contains 1G of non-sparse data, so we write about 7G
> in total).
There was talk on the NBD list a while ago about the idea of letting the
server advertise to the client when the image is known to start in an
all-zero state, so that the client doesn't have to waste time writing
zeroes (or relying on repeated NBD_CMD_BLOCK_STATUS calls to learn the
same). This may be justification for reviving that topic.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2018-11-07 16:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-07 12:13 [Qemu-devel] Change in qemu 2.12 causes qemu-img convert to NBD to write more data Richard W.M. Jones
2018-11-07 14:36 ` Richard W.M. Jones
2018-11-07 14:56 ` Nir Soffer
2018-11-07 15:02 ` Richard W.M. Jones
2018-11-07 17:27 ` [Qemu-devel] [Qemu-block] " Kevin Wolf
2018-11-07 17:55 ` Nir Soffer
2018-11-11 16:11 ` Nir Soffer
2018-11-15 22:27 ` Nir Soffer
2018-11-16 15:26 ` Kevin Wolf
2018-11-17 20:59 ` Nir Soffer
2018-11-17 21:13 ` Richard W.M. Jones
2018-11-18 7:24 ` Nir Soffer
2018-11-19 11:50 ` Kevin Wolf
2018-11-07 16:42 ` Eric Blake [this message]
2018-11-11 15:25 ` [Qemu-devel] " Nir Soffer
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=d797ae29-97ba-9c18-68ec-a2943bdf7728@redhat.com \
--to=eblake@redhat.com \
--cc=edgar.kaziakhmedov@virtuozzo.com \
--cc=nsoffer@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=rjones@redhat.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).