Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clamp GOMAXPROCS when higher than runtime.NumCPU (#8201)
* Clamp GOMAXPROCS when higher than runtime.NumCPU #### Background We are trying to automatically set GOMAXPROCS based on the number of CPUs that an ingester pod requests in Kubernetes. We're going with 2x the requested cores. The reason for this is that the default values of GOMAXPROCS is NumCPU. When running on large nodes and only utilizing a small % of the underlying node results in high scheduling overhead. #### Problem Sometimes the setting of GOMAXPROCS might exceed the number of cores of the node. We also don't want to restrict the nodes on which pods run. In those cases setting GOMAXPROCS to a higher value than NumCPU has the opposite effect - it increases scheduling overhead instead of reducing it. The idea of this PR is to basically make automating the GOMAXPROCS setting in deployment tooling easier by having some support from the code. Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> * Add CHANGELOG.md entry Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com> --------- Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
- Loading branch information