Re: [Nbd] maximum size of a read/write request
- To: Paolo Bonzini <pbonzini@...696...>
- Cc: public-nbd-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@...941..., Folkert van Heusden <public-folkert-Beo89p9qyDM6GGFevw1D/A@...941...>
- Subject: Re: [Nbd] maximum size of a read/write request
- From: Folkert van Heusden <folkert@...421...>
- Date: Mon, 10 Oct 2011 15:00:56 +0200
- Message-id: <CAFDOyVCQ3ZnS+Y8pu8evLUCEtGN2dYEvr4_xC00R1WqF-U5Dew@...18...>
- In-reply-to: <4E9057E5.30806@...696...>
- References: <CAFDOyVA=n4uBO9NyGeb6SP5fGc-zSkx81KBuMHskYW8qqf5R3Q@...18...> <4E9057E5.30806@...696...>
>> What is the maximum size of a read/write request? E.g. how much data can
>> be requested/transmitted using one read or write command?
>> And can this be limited using a nbd-client command-line setting and/or
>> nbd protocol handshake?
>
> In practice, I'd try to avoid reads that are more than 1 MB minus the reply header size, and writes that are more than 1 MB minus the request header size. qemu-nbd used to choke on those, though the next release will only choke on more than 1 MB.
>
> A good way to see what kind of request the kernel might make is to use dd with the O_DIRECT flag.
That is too tricky: a new kernel version might show differnt behaviour.
Imho we should specify a limit or make it configurable or put it in
the protocol. We have 124 bytes of handshake left, we can use 8 of
them for a maximum blocksize.
Reply to: