Skip to content

set gomaxprocs for workloads with limits and requests to avoid throttling

Michal Wasilewski requested to merge michalw/limit-no-go-threads into master

When rolling out: https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/12397 we noticed that pubsubbeat pods are being throttled a lot despite cpu usage being below requests and limits. We believe that the reason this is happening is that the Golang runtime is using all cores available to it to for running go routines. This meant that pubsubbeat was "burning through" its quota very quickly during bursts of workload and that resulted in throttling.

This MR tells the go runtime to only use 2 threads in gprd (where requests and limits are set to 2) which should prevent throttling (and thus avoid descheduling).

Signed-off-by: Michal Wasilewski mwasilewski@gitlab.com

Merge request reports