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

Re: [PATCH v3 2/5] doc: Fix requirement on preferred size



On Thu, Mar 29, 2018 at 09:58:04AM -0500, Eric Blake wrote:
> On 03/29/2018 07:36 AM, Wouter Verhelst wrote:
> > On Wed, Mar 28, 2018 at 02:43:27PM -0500, Eric Blake wrote:
> > > Setting the preferred size to >= min(min_size, 4k) doesn't make
> > > sense (a preferred size of 4k when min_size is 64k means that
> > > you get efficient I/O when requesting something smaller than
> > > the minimum granularity?).  Fix it by documenting the intended
> > > semantics that the preferred size is >= max(min_size, 4k).
> > 
> > Thanks, that does seem like an improvement.
> > 
> > Side note: there are still hard disks out there which use 512-byte
> > blocks[1]. It would make sense for an nbd server exporting a raw hard
> > disk with 512-byte blocks to use that as the preferred size.
> > 
> > What was the reasoning we used originally for clamping that to 4k at
> > minimum?
> 
> I'm not sure if we had a strong reason, other than 512-byte alignment tends
> not to be optimal these days.  Shall I tweak this to lower pref_size >=
> max(min_size, 512), while documenting that 4k or larger tends to be more
> usual?

We could make 4k the "default" or "recommended" or something like that,
but yeah, I think that if we're going to have a minimum value for the
preferred size, it should be 512, since that allows a server to do
something like "query the block size of the hard disk and use that as
the preferred size".

-- 
Could you people please use IRC like normal people?!?

  -- Amaya Rodrigo Sastre, trying to quiet down the buzz in the DebConf 2008
     Hacklab


Reply to: