Re: NBD prefetch read
On 03/19/2018 05:01 AM, Vladimir Sementsov-Ogievskiy wrote:
Hi all.
We need a possibility to ask NBD server to prefetch some data, but do
not send it to the wire, something like readahead command.
Do other storage systems (such as ISCSI) support a readahead commands
separate from a normal read? What are the intended semantics, that a
client can issue a readahead command and get an instant response from
the server acknowledging the request, and then a later NBD_CMD_READ to
the same area might be serviced faster as a result of the server
preparing its caches from the initial readahead command? What failures
are possible, or would the command be completely advisory (and thus
never fail, but also never guarantee that it makes any speed
differences)? Would there be limits on how much you can readahead
without polluting the cache to the point that you are actually hurting
instead of helping performance?
We suggest to realize this possibility by adding a negotiated flag to
READ command. An alternative may be a separate PREFETCH (or READAHEAD)
command.
I'd prefer a separate command, rather than a flag to the existing
NBD_CMD_READ. In particular, if the client does not negotiate
structured reads, then having the presence or absence of a return
payload be based on the value of the flag makes it that much more
context-sensitive to parse the server's reply stream.
The actual case is the following: we need a managed copy-on-read
process, where third tool dictates the sequence of copying process, but
it don't set nor source neither destination.
Can you demonstrate an actual sequence of commands sent over the wire,
for how it would be useful?
What do you think?
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
Reply to: