Skip to content

*: set right GOMAXPROCS#171

Merged
hawkingrei merged 2 commits intopingcap:masterfrom
hawkingrei:set_right_gomaxprocs
Sep 18, 2023
Merged

*: set right GOMAXPROCS#171
hawkingrei merged 2 commits intopingcap:masterfrom
hawkingrei:set_right_gomaxprocs

Conversation

@hawkingrei
Copy link
Copy Markdown
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
@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.

2 participants