Re: [PATCH 87/88] Add configurable prefetch size for layoutget

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

 



Hi, Benny,

On Sat, Jun 11, 2011 at 5:15 AM, Benny Halevy <benny@xxxxxxxxxx> wrote:
> On 2011-06-10 16:03, Fred Isaman wrote:
>> On Fri, Jun 10, 2011 at 3:23 PM, Benny Halevy <benny@xxxxxxxxxx> wrote:
>>>
>>> A simple algorithm I can suggest is:
>>> - on initialization, calculate and save, per layout driver
>>> Â- maximum layout size
>>
>> I must be misunderstanding something. ÂLayout size has nothing to do
>> with io size (other than the obvious fact that you want the layout >
>> io).
>
> Exactly, and if the layouts you get from the server are too small
> it's hard to do efficient I/O (modulo layout segment merging
> or gathering)
>
>>
>> I don't know about the object driver, but for both the file and block
>> drivers the client wants as much as the server will give it.
>>
>
> For blocks the message buffer size (as mentioned below) may be
> a limiting factor hence the limit.
It is true that message buffer size can limit the number of extents
returned by block server. But the length that each extent is
addressing is unknown. It can be of any size from layout_blksize to
even larger than file size), determined by the file's on disk layout.
Client cannot guess maximum segment size based on message buffer size.

> Another constraint for blocks and for objects to some extent is
> provisional allocation where you don't want to just arbitrarily
> ask for artificially large write layouts and this may be interpreted
> as intent to write to the whole range and will result in excessive
> provisional allocation of resources.
>
> Bottom line, I completely agree with "the client wants as much as the
> server will give it" so it should ask for what it needs and let the
> server decide whether to extend or trim the range if need be.
>
> Benny
>
>> Fred
>>
>>> Â Â- take into account csr_fore_chan_attrs.ca_maxresponsesize and possible other parameters
>>> Â- keep a working copy of the maximum value and the calculated copy.
>>> Â- alignment value.
>>> - on miss, see if there's an adjacent layout segment in cache
>>> - if found, ask for twice the found segment size, up to the maximum value,
>>> Âaligned on the alignment value.
>>> - if the server returns less the layoutget range, keep note of the returned length
>>> Â(but not adjust maximum yet, as the server may return a short segment for various
>>> Â reasons)
>>> - if the server is consistent about returning less than was asked, adjust the
>>> Â- working copy of the maximum length
>>> - if the maximum was adjusted try bumping it up after X (TBD) layoutgets or T seconds
>>> Âto see if that was just due to high load or conflicts on the server
>>> - on any error returned for LAYOUTGET reset the algorithm parameters
>>> - on session reestablishment recalculate maximums.
>>>
>>> Benny
>>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>> the body of a message to majordomo@xxxxxxxxxxxxxxx
>> More majordomo info at Âhttp://vger.kernel.org/majordomo-info.html
>



-- 
Thanks,
-Bergwolf
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux