mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-03-21 15:45:01 +00:00
lib/storage: reduce the amounts of memory which can be occupied by rawRow items during data ingestion on a system with many CPU cores
This commit is contained in:
parent
56192f24b4
commit
d06c0e7a94
1 changed files with 1 additions and 1 deletions
|
@ -82,7 +82,7 @@ var rawRowsShardsPerPartition = (cgroup.AvailableCPUs() + 7) / 8
|
||||||
// getMaxRowsPerPartition returns the maximum number of rows that haven't been converted into parts yet.
|
// getMaxRowsPerPartition returns the maximum number of rows that haven't been converted into parts yet.
|
||||||
func getMaxRawRowsPerPartition() int {
|
func getMaxRawRowsPerPartition() int {
|
||||||
maxRawRowsPerPartitionOnce.Do(func() {
|
maxRawRowsPerPartitionOnce.Do(func() {
|
||||||
n := memory.Allowed() / 256 / int(unsafe.Sizeof(rawRow{}))
|
n := memory.Allowed() / rawRowsShardsPerPartition / 256 / int(unsafe.Sizeof(rawRow{}))
|
||||||
if n < 1e4 {
|
if n < 1e4 {
|
||||||
n = 1e4
|
n = 1e4
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue