Skip to content
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

feat(runtime): automatically optimize Go runtime based on cgroup limits #1839

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

weisdd
Copy link
Collaborator

@weisdd weisdd commented Jan 27, 2025

To make Go runtime aware of CGroup limits, added two calls that set appropriate values for GOMEMLIMIT (affects GC schedule) and GOMAXPROCS (affects number of OS threads that can execute user-level Go code simultaneously).

If the operator is deployed without resource limits, then GOMEMLIMIT and GOMAXPROCS will not be set.
If the respective environment variables are already present, then no changes are made.

@github-actions github-actions bot added the feature this PR introduces a new feature label Jan 27, 2025
Copy link
Member

@theSuess theSuess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Looking forward to seeing how this affects memory & cpu usage :)

@theSuess theSuess added this pull request to the merge queue Jan 28, 2025
Merged via the queue into master with commit eb65a01 Jan 28, 2025
15 checks passed
@theSuess theSuess deleted the feat/automatically-optimize-go-runtime branch January 28, 2025 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature this PR introduces a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants