Chu Cheng Li created HDDS-18017:
-----------------------------------
Summary: Start the streaming read pre-read small and grow it on
sequential reads
Key: HDDS-18017
URL: https://issues.apache.org/jira/browse/HDDS-18017
Project: Apache Ozone
Issue Type: Improvement
Components: Ozone Client
Reporter: Chu Cheng Li
Assignee: Chu Cheng Li
A streaming block read ({{ozone.client.stream.readblock.enable}}) asks the
datanode for the bytes it needs plus a fixed pre-read of
{{ozone.client.stream.read.pre-read-size}} (32 MB by default). This starts with
the first read after open or seek. It works well for a sequential read, but a
reader that seeks, reads a little and seeks again makes the datanode read up to
32 MB from disk each time, and none of it is used.
HDDS-17942 avoids this for S3 range GETs that fit the S3 Gateway copy buffer (4
MB). Larger range GETs, and seek + read through ofs or o3fs, still pay for the
full pre-read. A pre-read size of 0 is not a fix: the setting applies to the
whole client, and a full GET of a 256 MB key through S3 Gateway became about
2.5 times slower with it.
Proposal: size the pre-read by how the stream is read, as file system readahead
does.
* Start with a small window after open and after seek.
* Grow the window while the reads stay sequential, up to
{{ozone.client.stream.read.pre-read-size}}.
The datanode sends the whole requested length of a ReadBlock request and does
not check whether the client still wants it, so today the pre-read size is also
the only limit on the wasted read.
Found during the Flink ForSt test for HDDS-17894.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]