volume: add "readBufSize" option to customize read optimization (#3702)

* simplify a bit

* feat: volume: add "readBufSize" option to customize read optimization

* refactor : redbufSIze -> readBufferSize

* simplify a bit

* simplify a bit
This commit is contained in:
famosss
2022-09-16 15:30:40 +08:00
committed by GitHub
parent cf90f76a35
commit d949a238b8
6 changed files with 15 additions and 3 deletions

View File

@@ -44,6 +44,10 @@ type ReadOption struct {
// * read requests should complete asap, not blocking other requests.
// * write requests may see high latency when downloading large files.
HasSlowRead bool
// increasing ReadBufferSize can reduce the number of get locks times and shorten read P99 latency.
// but will increase memory usage a bit. Use with hasSlowRead normally.
ReadBufferSize int
}
/*