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

fn+proof: use GOMAXPROCS for worker pool size #1123

Merged
merged 1 commit into from
Sep 16, 2024
Merged

Conversation

jharveyb
Copy link
Collaborator

Noticed while reading #675 .

The impact of a mismatch between runtime.NumCPU() and GOMAXPROCS is a known issue:

golang/go#33803

https://github.com/uber-go/automaxprocs

Tl;dr, if a user wants to limit the OS threads used by tapd and sets GOMAXPROCS, that will have no effect right now. Reading GOMAXPROCS is preferred to runtime.NumCPU() for setting the size of a CPU-bound worker pool. This matches runtime.NumCPU() by default.

https://pkg.go.dev/runtime#GOMAXPROCS

Copy link

Pull Request Test Coverage Report for Build 10886204783

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 2 of 3 (66.67%) changed or added relevant lines in 2 files are covered.
  • 19 unchanged lines in 5 files lost coverage.
  • Overall coverage remained the same at 40.15%

Changes Missing Coverage Covered Lines Changed/Added Lines %
fn/concurrency.go 1 2 50.0%
Files with Coverage Reduction New Missed Lines %
commitment/tap.go 1 84.17%
tapdb/addrs.go 2 79.04%
tapdb/universe.go 4 80.91%
tapgarden/caretaker.go 4 68.5%
universe/interface.go 8 50.22%
Totals Coverage Status
Change from base Build 10839632557: 0.0%
Covered Lines: 23985
Relevant Lines: 59739

💛 - Coveralls

Copy link
Member

@GeorgeTsagk GeorgeTsagk left a comment

Choose a reason for hiding this comment

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

Lgtm

@dstadulis dstadulis added this to the v0.4.2 milestone Sep 16, 2024
@guggero guggero merged commit 552f838 into main Sep 16, 2024
18 checks passed
@guggero guggero deleted the observe_gomaxprocs branch September 16, 2024 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

5 participants