Skip to content

Add support for appropriate GOMAXPROCS that's aware of Kubernetes limits. #136

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

Merged
merged 3 commits into from
Oct 24, 2024

Conversation

patrickdappollonio
Copy link
Owner

When http-server is run with Kubernetes resource requests/limits, the limits seen by the container are not the same limits set in the resources: section. It's a longstanding issue in the Go community where on a CFS scheduler, Go mistakenly takes the value of the host not the value provided by CFS.

This is a very simple change that imports Uber's gomaxprocs package which automatically configures these values if they're running inside container with a CFS scheduler.

@patrickdappollonio patrickdappollonio self-assigned this Oct 24, 2024
@patrickdappollonio patrickdappollonio merged commit 2cd30c5 into master Oct 24, 2024
2 checks passed
@patrickdappollonio patrickdappollonio deleted the maxprocs branch October 24, 2024 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant