mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
avoid pre-populating buffers for deployments < 32GiB memory (#19839)
This commit is contained in:
@@ -104,7 +104,11 @@ func newErasureServerPools(ctx context.Context, endpointServerPools EndpointServ
|
||||
// Initialize byte pool once for all sets, bpool size is set to
|
||||
// setCount * setDriveCount with each memory upto blockSizeV2.
|
||||
buffers := bpool.NewBytePoolCap(n, blockSizeV2, blockSizeV2*2)
|
||||
buffers.Populate()
|
||||
if n >= 16384 {
|
||||
// pre-populate buffers only n >= 16384 which is (32Gi/2Mi)
|
||||
// for all setups smaller than this avoid pre-alloc.
|
||||
buffers.Populate()
|
||||
}
|
||||
globalBytePoolCap.Store(buffers)
|
||||
|
||||
var localDrives []StorageAPI
|
||||
|
||||
Reference in New Issue
Block a user