qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1.8 3/6] qemu-img: add option to specify alterna


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 1.8 3/6] qemu-img: add option to specify alternate iobuffer size
Date: Mon, 25 Nov 2013 16:48:55 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9

Il 25/11/2013 16:24, Peter Lieven ha scritto:
> On 25.11.2013 16:14, Paolo Bonzini wrote:
>> Il 25/11/2013 16:07, Peter Lieven ha scritto:
>>>>> since the convert process is basically a sync operation it might
>>>>> be benificial in some case to change the hardcoded I/O buffer
>>>>> size to an alternate (greater) value.
>>>> Do you really need the extra knob?  You can just add to BlockLimits the
>>>> optimal transfer length, and use it unconditionally.
>>> If you say patch 5 and 3 are ok. What could be done is to remove
>>> this knob and increase the iobuf_size to cluster_size if cluster_size
>>> is greater.
>> Yes, that makes sense because it avoids unnecessary COW.
>>
>>> I do not want to increase the default iobuf size to anything
>>> greater than 2MB. I do not know why this was choosen, but maybe
>>> there was a reason for it.
>> I think it is fine to increase it to the cluster_size or even to the
>> optimal transfer length (new BlockLimits field).
> okay scsi speaking:
>  bs->bl.optimal_transfer_length = max(iscsilun->bl.opt_xfer_len,
> iscsilun->bl.opt_unmap_gran) ?

I was thinking more of

  bs->bl.optimal_transfer_length = lun2qemu(iscsilun->bl.opt_xfer_len);

 ...
 iobuf_size =
      max(bs->bl.optimal_transfer_length, cluster_sectors)*512;
 iobuf_size = min(16MB, max(2MB, iobuf_size));

> bdi->cluster_size as in Patch 3?

Yes, that one's fine.

>> * clamp maximum size to optimal transfer length.
> or increase it if its larger. for the dell equallogic storages we use
> the opt_unmap_gran
> is 15MB!!!

You're right, maximum size is really bounded anyway by iobuf_size.

>> * then, round final sector down to unmap granularity
> okay, i will try your modification to only round down the last sector.
> would you use bdi->cluster_size or the unmap alignment field from the
> bs->bl?

bdi->cluster_size.  The qemu-img reason for the rounding is to avoid
unnecessary COW, which is what bdi->cluster_size is about.  It just so
happens that it helps your benchmark too. :)

Paolo

> Peter




reply via email to

[Prev in Thread] Current Thread [Next in Thread]