New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
k8s 集群内部署的话直接用NumCPU()获取不到真实可用核心数 #313
Comments
github.com/shirou/gopsutil v3 |
It seems that gopsutil doesn't work well in k8s too. stackoverflow answer recommand https://github.com/uber-go/automaxprocs.
pixiu code is like below
Do we need assign limitCpuNumber by command argument ? |
More recommended use go.uber.org/automaxprocs which automatically set GOMAXPROCS according to linux container quota。https://github.com/shirou/gopsutil/blob/master/cpu/cpu.go#L64 which returns the number of physical can't fix this. go.uber.org/automaxprocs has been used in dapr ,jaeger to fix the same bug. |
https://github.com/apache/dubbo-go-pixiu/blob/develop/cmd/pixiu/pixiu.go#L151
这里是不是有点问题. 在 k8s 集群内部署的话直接用NumCPU()获取不到真实可用核心数. 会导致调度不合理延迟加大.
from others
The text was updated successfully, but these errors were encountered: