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

@@ -34,28 +34,35 @@ import (
// Block sizes constant.
const (
BlockSizeSmall = 32 * humanize.KiByte // Default r/w block size for smaller objects.
BlockSizeLarge = 1 * humanize.MiByte // Default r/w block size for normal objects.
BlockSizeReallyLarge = 4 * humanize.MiByte // Default r/w block size for very large objects.
SmallBlock = 32 * humanize.KiByte // Default r/w block size for smaller objects.
LargeBlock = 1 * humanize.MiByte // Default r/w block size for normal objects.
XLargeBlock = 4 * humanize.MiByte // Default r/w block size for very large objects.
XXLargeBlock = 8 * humanize.MiByte // Default r/w block size for very very large objects.
)
// aligned sync.Pool's
var (
ODirectPoolXXLarge = sync.Pool{
New: func() interface{} {
b := disk.AlignedBlock(XXLargeBlock)
return &b
},
}
ODirectPoolXLarge = sync.Pool{
New: func() interface{} {
b := disk.AlignedBlock(BlockSizeReallyLarge)
b := disk.AlignedBlock(XLargeBlock)
return &b
},
}
ODirectPoolLarge = sync.Pool{
New: func() interface{} {
b := disk.AlignedBlock(BlockSizeLarge)
b := disk.AlignedBlock(LargeBlock)
return &b
},
}
ODirectPoolSmall = sync.Pool{
New: func() interface{} {
b := disk.AlignedBlock(BlockSizeSmall)
b := disk.AlignedBlock(SmallBlock)
return &b
},
}