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

Re: [Nbd] block size



On Thu, Jan 6, 2011 at 3:02 PM, folkert <folkert@...421...> wrote:
> nbd-client -h tells me:
>  Allowed values for blocksize are 512,1024,2048,4096

device blocksize can't be larger than page size

> Now conventional jumbo frames (which become popular on Gb networks) are
> 9000 bytes. So 1 8192 NBD block would fit in it nicely.

The device's blocksize doesn't necessarily correspond to the size of
the packets on the network. Because the scheduler can coalesce
multiple I/Os, you usually end up with larger I/O requests when doing
sequential reads/writes. When doing non-sequential I/O, you're going
to end up with requests the size of the filesystem blocksize (4k
generally). TCP is then going to break the larger requests into
segments for optimal transfer given the physical layer's MTU, so the
breakdown into proper sized network packets should be happening
already.

And changing the device's blocksize won't actually improve the
non-optimal small I/O request case. In fact, it can be detrimental, as
if the device's blocksize is larger than the filesystem blocksize then
you'll end up doing read/modify/write instead of just write on smaller
writes.

--
Paul



Reply to: