mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +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
|
||||
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 {
|
||||
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.
|
||||
|
|
Loading…
Reference in a new issue