From: Peter Lieven <pl@kamp.de>
To: ronnie sahlberg <ronniesahlberg@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert
Date: Fri, 19 Jul 2013 16:02:36 +0200 [thread overview]
Message-ID: <51E946FC.2050302@kamp.de> (raw)
In-Reply-To: <CAN05THQ8eqtH-5nihe4rwo5hn6HJvBzDMN12kgDOqDYmEgne=w@mail.gmail.com>
On 19.07.2013 16:00, ronnie sahlberg wrote:
> On Fri, Jul 19, 2013 at 6:49 AM, Peter Lieven <pl@kamp.de> wrote:
>> On 19.07.2013 15:25, ronnie sahlberg wrote:
>>> On Thu, Jul 18, 2013 at 11:08 PM, Peter Lieven <pl@kamp.de> wrote:
>>>> On 19.07.2013 07:58, Paolo Bonzini wrote:
>>>>> Il 18/07/2013 21:28, Peter Lieven ha scritto:
>>>>>> thanks for the details. I think to have optimal performance and best
>>>>>> change for unmapping in qemu-img convert
>>>>>> it might be best to export the OPTIMAL UNMAP GRANULARITY
>>>>> Agreed about this.
>>>>>
>>>>>> as well as the write_zeroes_w_discard capability via the BDI
>>>>> But why this?!? It is _not_ needed. All you need is to change the
>>>>> default of the "-S" option to be the OPTIMAL UNMAP GRANULARITY if it is
>>>>> nonzero.
>>>> 2 reasons:
>>>> a) Does this guarantee that the requests are aligned to multiple of the
>>>> -S
>>>> value?
>>>>
>>>> b) If I this flag exists qemu-img convert can do the "zeroing" a priori.
>>>> This
>>>> has the benefit that combined with bdrv_get_block_status requests before
>>>> it
>>>> might
>>>> not need to touch large areas of the volume. Speaking for iSCSI its
>>>> likely
>>>> that
>>>> the user sets a fresh volume as the destination, but its not guaranteed.
>>>> With the Patch 4 there are only done a few get_block_status requests to
>>>> verify
>>>> this. If we just write zeroes with BDRV_MAY_UNMAP, we send hundreds or
>>>> thousands of writesame requests for possibly already unmapped data.
>>>>
>>>> To give an example. If I take my storage with an 1TB volume. It takes
>>>> about
>>>> 10-12
>>>> get_block_status requests to verify that it is completely unmapped. After
>>>> this
>>>> I am safe to set has_zero_init = 1 in qemu-img convert.
>>>>
>>>> If I would convert a 1TB image to this target where lets say 50% are at
>>>> leat
>>>> 15MB
>>>> zero blocks (15MB is the OUG of my storage) it would take ~35000 write
>>>> same
>>>> requests to achieve the same.
>>> I am not sure I am reading this right, but you dont have to writesame
>>> exactly 1xOUG to get it to unmap.
>>> nxOUG will work too,
>>> So instead of sending one writesame for each OUG range, you can send
>>> one writesame for every ~10G or so.
>>> Say 10G is ~667 OUGs for your case, so you can send
>>> writesame for ~667xOUG in each command and then it would "only" take
>>> ~100 writesames instead of ~35000.
>>>
>>> So as long as you are sending in multiples of OUG you should be fine.
>> do I not have to take care of max_ws_size?
> Yes you need to handle mas_ws_size but I would imagine that on most
> targets that max_ws_size >> OUG
> I would be surprised if a target would set max_ws_size to just a single OUG.
for may target it is ;-(
maybe I would use max_ws_size for the write_zeroes_with unmap
thing. I would think it is a multiple of oug if it is specified.
Peter
next prev parent reply other threads:[~2013-07-19 14:02 UTC|newest]
Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-15 10:49 [Qemu-devel] [PATCH 0/4] qemu-img: conditionally discard target on convert Peter Lieven
2013-07-15 10:49 ` [Qemu-devel] [PATCH 1/4] block: add discard_zeroes and max_unmap to BlockDriverInfo Peter Lieven
2013-07-15 10:49 ` [Qemu-devel] [PATCH 2/4] iscsi: add .bdrv_get_info Peter Lieven
2013-07-15 10:49 ` [Qemu-devel] [PATCH 3/4] block/raw: " Peter Lieven
2013-07-19 5:12 ` Stefan Hajnoczi
2013-07-15 10:49 ` [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert Peter Lieven
2013-07-17 8:46 ` Kevin Wolf
2013-07-17 9:58 ` Paolo Bonzini
2013-07-17 10:21 ` Peter Lieven
2013-07-17 10:27 ` Kevin Wolf
2013-07-17 10:31 ` Peter Lieven
2013-07-17 10:47 ` Paolo Bonzini
2013-07-17 14:19 ` Peter Lieven
2013-07-17 10:45 ` Paolo Bonzini
2013-07-17 14:21 ` Peter Lieven
2013-07-17 14:26 ` Paolo Bonzini
2013-07-17 10:25 ` Kevin Wolf
2013-07-17 15:54 ` ronnie sahlberg
2013-07-17 16:27 ` Paolo Bonzini
2013-07-17 16:31 ` ronnie sahlberg
2013-07-17 17:02 ` Peter Lieven
2013-07-17 17:04 ` Paolo Bonzini
2013-07-17 17:48 ` Peter Lieven
2013-07-17 20:00 ` Paolo Bonzini
2013-07-18 9:23 ` Kevin Wolf
2013-07-18 10:24 ` Paolo Bonzini
2013-07-18 10:42 ` Kevin Wolf
2013-07-18 10:44 ` Peter Lieven
2013-07-18 10:56 ` Paolo Bonzini
2013-07-18 11:04 ` Peter Lieven
2013-07-18 12:31 ` Paolo Bonzini
2013-07-18 13:29 ` Peter Lieven
2013-07-18 13:52 ` Paolo Bonzini
2013-07-18 14:09 ` Peter Lieven
2013-07-18 14:20 ` Paolo Bonzini
2013-07-18 14:32 ` Peter Lieven
2013-07-18 14:35 ` Paolo Bonzini
2013-07-18 18:43 ` Peter Lieven
2013-07-18 18:54 ` ronnie sahlberg
2013-07-18 19:28 ` Peter Lieven
2013-07-19 5:58 ` Paolo Bonzini
2013-07-19 6:08 ` Peter Lieven
2013-07-19 13:25 ` ronnie sahlberg
2013-07-19 13:49 ` Peter Lieven
2013-07-19 14:00 ` ronnie sahlberg
2013-07-19 14:02 ` Peter Lieven [this message]
2013-07-19 13:58 ` ronnie sahlberg
2013-07-18 13:55 ` ronnie sahlberg
2013-07-18 14:14 ` Paolo Bonzini
2013-09-12 8:52 ` Peter Lieven
2013-09-12 8:55 ` Paolo Bonzini
2013-09-12 9:03 ` Peter Lieven
2013-07-17 17:09 ` ronnie sahlberg
2013-07-18 9:21 ` Kevin Wolf
2013-07-17 10:22 ` Peter Lieven
2013-07-16 10:55 ` [Qemu-devel] [PATCH 0/4] " Paolo Bonzini
2013-07-16 11:18 ` Peter Lieven
2013-07-16 11:27 ` Paolo Bonzini
2013-07-16 11:40 ` Peter Lieven
2013-07-16 11:55 ` Paolo Bonzini
2013-07-17 10:23 ` Peter Lieven
2013-07-17 10:28 ` Paolo Bonzini
2013-07-17 10:40 ` Peter Lieven
2013-07-17 10:50 ` Paolo Bonzini
2013-07-17 14:18 ` Peter Lieven
2013-07-17 14:26 ` Paolo Bonzini
2013-07-17 14:46 ` Peter Lieven
2013-07-17 14:53 ` Paolo Bonzini
2013-07-17 15:12 ` Kevin Wolf
2013-07-17 16:53 ` Peter Lieven
2013-07-17 17:01 ` Peter Lieven
2013-07-19 5:13 ` Stefan Hajnoczi
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=51E946FC.2050302@kamp.de \
--to=pl@kamp.de \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=ronniesahlberg@gmail.com \
--cc=stefanha@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).