mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 00:13:30 +01:00
lib/cgroup: do not adjust the number of detected CPU cores via /sys/devices/system/cpu/online
The adjustement increases the resulting GOMAXPROC by 1, which looks confusing to users as outlined at https://github.com/VictoriaMetrics/VictoriaMetrics/issues/685#issuecomment-698595309
This commit is contained in:
parent
f4d74ccfec
commit
5e998e597a
@ -65,9 +65,7 @@ func getOnlineCPUCount() float64 {
|
||||
if n <= 0 {
|
||||
return -1
|
||||
}
|
||||
// Add a half of CPU core, since it looks like actual cores is usually bigger than online cores.
|
||||
// See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/685#issuecomment-674423728
|
||||
return n + 0.5
|
||||
return n
|
||||
}
|
||||
|
||||
func countCPUs(data string) int {
|
||||
|
Loading…
Reference in New Issue
Block a user