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

*: set right GOMAXPROCS #171

Merged
merged 2 commits into from
Sep 18, 2023
Merged

Conversation

hawkingrei
Copy link
Member

@hawkingrei hawkingrei commented Sep 18, 2023

In containerized deployments, Go runtime, by default, uses the total number of CPU cores available on the machine as the value of GOMAXPROCS, without considering the CPU quota of the container. This can lead to suboptimal performance and potential throttling issues as more goroutines may get scheduled than the available CPU quota.

Uber's automaxprocs library automatically adjusts the GOMAXPROCS value to match the Linux container's CPU quota, leading to more efficient CPU usage and potentially better performance.

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
@hawkingrei hawkingrei merged commit 10e1032 into pingcap:master Sep 18, 2023
2 checks passed
@hawkingrei hawkingrei deleted the set_right_gomaxprocs branch September 18, 2023 09:27
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.

None yet

2 participants