mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/mergeset: increase pool capacity for inmemoryBlock according to collected profiles from production workload
CPU and memory profiles show that the pool capacity for inmemoryBlock objects is too small. This results in the increased load on memory allocation code in Go runtime. Increase the pool capacity in order to reduce the load on Go runtime.
This commit is contained in:
parent
f71e4d1853
commit
78c9174682
1 changed files with 1 additions and 1 deletions
|
@ -562,4 +562,4 @@ func putInmemoryBlock(ib *inmemoryBlock) {
|
|||
// Every inmemoryBlock struct occupies at least 64KB of memory, e.g. quite big amounts of memory.
|
||||
// Use a chan instead of sync.Pool in order to reduce memory usage on systems
|
||||
// with big number of CPU cores.
|
||||
var ibPoolCh = make(chan *inmemoryBlock, cgroup.AvailableCPUs())
|
||||
var ibPoolCh = make(chan *inmemoryBlock, 100*cgroup.AvailableCPUs())
|
||||
|
|
Loading…
Reference in a new issue