mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-02-09 15:27:11 +00:00
lib/memory: improve log message about the memory allowed to use by VictoriaMetrics
This commit is contained in:
parent
ed00eb3f33
commit
7c0d6a8b88
1 changed files with 4 additions and 3 deletions
|
@ -38,12 +38,13 @@ func initOnce() {
|
||||||
}
|
}
|
||||||
percent := *allowedPercent / 100
|
percent := *allowedPercent / 100
|
||||||
allowedMemory = int(float64(mem) * percent)
|
allowedMemory = int(float64(mem) * percent)
|
||||||
|
remainingMemory = mem - allowedMemory
|
||||||
|
logger.Infof("limiting caches to %d bytes, leaving %d bytes to the OS according to -memory.allowedPercent=%f", allowedMemory, remainingMemory, *allowedPercent)
|
||||||
} else {
|
} else {
|
||||||
allowedMemory = *allowedBytes
|
allowedMemory = *allowedBytes
|
||||||
|
remainingMemory = mem - allowedMemory
|
||||||
|
logger.Infof("limiting caches to %d bytes, leaving %d bytes to the OS according to -memory.allowedBytes=%d", allowedMemory, remainingMemory, *allowedBytes)
|
||||||
}
|
}
|
||||||
remainingMemory = mem - allowedMemory
|
|
||||||
logger.Infof("limiting caches to %d bytes, leaving %d bytes to the OS according to -memory.allowedPercent=%f and -memory.allowedBytes=%d",
|
|
||||||
allowedMemory, remainingMemory, *allowedPercent, *allowedBytes)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allowed returns the amount of system memory allowed to use by the app.
|
// Allowed returns the amount of system memory allowed to use by the app.
|
||||||
|
|
Loading…
Reference in a new issue