mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
Fix byte pool usage, use only one pool for all sets. (#5990)
This commit is contained in:
parent
537fd8c821
commit
df1b33013f
@ -243,6 +243,11 @@ func newXLSets(endpoints EndpointList, format *formatXLV3, setCount int, drivesP
|
|||||||
}
|
}
|
||||||
|
|
||||||
mutex := newNSLock(globalIsDistXL)
|
mutex := newNSLock(globalIsDistXL)
|
||||||
|
|
||||||
|
// Initialize byte pool once for all sets, bpool size is set to
|
||||||
|
// setCount * drivesPerSet with each memory upto blockSizeV1.
|
||||||
|
bp := bpool.NewBytePoolCap(setCount*drivesPerSet, blockSizeV1, blockSizeV1*2)
|
||||||
|
|
||||||
for i := 0; i < len(format.XL.Sets); i++ {
|
for i := 0; i < len(format.XL.Sets); i++ {
|
||||||
s.xlDisks[i] = make([]StorageAPI, drivesPerSet)
|
s.xlDisks[i] = make([]StorageAPI, drivesPerSet)
|
||||||
|
|
||||||
@ -250,7 +255,7 @@ func newXLSets(endpoints EndpointList, format *formatXLV3, setCount int, drivesP
|
|||||||
s.sets[i] = &xlObjects{
|
s.sets[i] = &xlObjects{
|
||||||
getDisks: s.GetDisks(i),
|
getDisks: s.GetDisks(i),
|
||||||
nsMutex: mutex,
|
nsMutex: mutex,
|
||||||
bp: bpool.NewBytePoolCap(setCount*drivesPerSet, blockSizeV1, blockSizeV1*2),
|
bp: bp,
|
||||||
}
|
}
|
||||||
go s.sets[i].cleanupStaleMultipartUploads(context.Background(), globalMultipartCleanupInterval, globalMultipartExpiry, globalServiceDoneCh)
|
go s.sets[i].cleanupStaleMultipartUploads(context.Background(), globalMultipartCleanupInterval, globalMultipartExpiry, globalServiceDoneCh)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user