From: Eric Blake <eblake@redhat.com>
To: Max Reitz <mreitz@redhat.com>, qemu-devel@nongnu.org
Cc: fullmanet@gmail.com, qemu-block@nongnu.org,
Kevin Wolf <kwolf@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/2] qemu-img: Add dd seek= option
Date: Wed, 15 Aug 2018 21:57:38 -0500 [thread overview]
Message-ID: <58ddf808-3d02-92e8-fa8e-a25339577bfb@redhat.com> (raw)
In-Reply-To: <d8c5df8d-7ae2-8ddc-aa71-38ec06b79988@redhat.com>
On 08/15/2018 09:49 PM, Max Reitz wrote:
>>> In my opinion, we do not want feature parity with dd. What we do want
>>> is feature parity with convert.
>>
>> Well, convert is lacking a way to specify a subset of one file to move
>> to a (possibly different) subset of the other. I'm fine if we want to
>> enhance convert to do the things that right now require a dd-alike
>> interface (namely, limiting the copying to less than the full file, and
>> choosing the offset at which to start [before this patch] or write to
>> [with this patch]).
>
> Yes, I would want that.
>
>> If convert were more powerful, I'd be fine dropping 'qemu-img dd' after
>> a proper deprecation period.
>
> Technically it has those features already, with the raw block driver's
> offset and size parameters.
Perhaps so, but it will be an interesting exercise in rewriting the
shorthand nbd://host:port/export into the proper longhand driver syntax.
>>
>> Because of performance: qemu-nbd + Linux nbd device + real dd is one
>> more layer of data copying (each write() from dd goes to kernel, then is
>> sent to qemu-nbd in userspace as a socket message before being sent back
>> to the kernel to actually write() to the final destination) compared to
>> just doing it all in one process (write() lands in the final destination
>> with no further user space bouncing). And because the additional steps
>> to set it up are awkward (see my other email where I rant about losing
>> the better part of today to realizing that 'dd ...; qemu-nbd -d
>> /dev/nbd1' loses data if you omit conv=fdatasync).
>
> I can see the sync problems, but is the performance really that much worse?
When you don't have sparse file support, reading or writing large blocks
of zeroes really is worse over /dev/nbd* than over a server/client pair
that know how to do it efficiently. But for non-sparse data, I don't
know if a benchmark would be able to consistently note a difference
(might be a fun benchmark for someone to try, but not high on my current
to-do list).
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2018-08-16 2:58 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-15 2:56 [Qemu-devel] [PATCH 0/2] Improve qemu-img dd Eric Blake
2018-08-15 2:56 ` [Qemu-devel] [PATCH 1/2] qemu-img: Fix dd with skip= and count= Eric Blake
2018-08-16 2:03 ` Max Reitz
2018-08-16 2:17 ` Eric Blake
2018-08-16 2:19 ` Max Reitz
2018-08-15 2:56 ` [Qemu-devel] [PATCH 2/2] qemu-img: Add dd seek= option Eric Blake
2018-08-16 2:20 ` Max Reitz
2018-08-16 2:39 ` Eric Blake
2018-08-16 2:49 ` Eric Blake
2018-08-16 2:49 ` Max Reitz
2018-08-16 2:57 ` Eric Blake [this message]
2018-08-16 3:00 ` Max Reitz
2018-08-16 7:15 ` Kevin Wolf
2018-08-17 19:22 ` Max Reitz
2018-08-20 2:07 ` Fam Zheng
2018-08-20 12:20 ` Max Reitz
2018-08-16 2:04 ` [Qemu-devel] [PATCH 0/2] Improve qemu-img dd Eric Blake
2018-08-16 2:12 ` Eric Blake
2018-08-16 19:39 ` no-reply
2018-08-16 20:00 ` no-reply
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=58ddf808-3d02-92e8-fa8e-a25339577bfb@redhat.com \
--to=eblake@redhat.com \
--cc=fullmanet@gmail.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.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 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).