fix: increase the tiering part size to 128MiB (#19424)

also introduce 8MiB buffer to read from for
bigger parts
This commit is contained in:
Harshavardhana
2024-04-08 02:22:27 -07:00
committed by GitHub
parent 04101d472f
commit c957e0d426
6 changed files with 24 additions and 11 deletions

View File

@@ -595,6 +595,8 @@ func (s *storageRESTServer) ReadFileStreamHandler(w http.ResponseWriter, r *http
// Windows can lock up with this optimization, so we fall back to regular copy.
sr, ok := rc.(*sendFileReader)
if ok {
// Sendfile sends in 4MiB chunks per sendfile syscall which is more than enough
// for most setups.
_, err = rf.ReadFrom(sr.Reader)
if !xnet.IsNetworkOrHostDown(err, true) { // do not need to log disconnected clients
storageLogIf(r.Context(), err)