mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-23 20:37:12 +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
7dc67cd883
commit
76b244cfcf
@ -65,9 +65,7 @@ func getOnlineCPUCount() float64 {
|
|||||||
if n <= 0 {
|
if n <= 0 {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
// Add a half of CPU core, since it looks like actual cores is usually bigger than online cores.
|
return n
|
||||||
// See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/685#issuecomment-674423728
|
|
||||||
return n + 0.5
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func countCPUs(data string) int {
|
func countCPUs(data string) int {
|
||||||
|
Loading…
Reference in New Issue
Block a user