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

@@ -2131,11 +2131,15 @@ func (s *xlStorage) writeAllDirect(ctx context.Context, filePath string, fileSiz
var bufp *[]byte
switch {
case fileSize > 0 && fileSize >= xioutil.BlockSizeReallyLarge:
case fileSize > 0 && fileSize >= xioutil.XXLargeBlock*2:
// use a larger 8MiB buffer for a really really large streamsx.
bufp = xioutil.ODirectPoolXXLarge.Get().(*[]byte)
defer xioutil.ODirectPoolXXLarge.Put(bufp)
case fileSize > 0 && fileSize >= xioutil.XLargeBlock:
// use a larger 4MiB buffer for a really large streams.
bufp = xioutil.ODirectPoolXLarge.Get().(*[]byte)
defer xioutil.ODirectPoolXLarge.Put(bufp)
case fileSize <= xioutil.BlockSizeSmall:
case fileSize <= xioutil.SmallBlock:
bufp = xioutil.ODirectPoolSmall.Get().(*[]byte)
defer xioutil.ODirectPoolSmall.Put(bufp)
default: