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

Limit concurrent shards loading to number of cores available #6626

Merged
merged 1 commit into from
May 13, 2016

Conversation

jwilder
Copy link
Contributor

@jwilder jwilder commented May 13, 2016

Required for all non-trivial PRs
  • Rebased/mergable
  • Tests pass

@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @e-dard to be a potential reviewer

@jwilder jwilder added this to the 1.0.0 milestone May 13, 2016
@jwilder
Copy link
Contributor Author

jwilder commented May 13, 2016

@corylanou Forgot to push this up w/ #6623

@joelegasse
Copy link
Contributor

It might be uncommon, but this should probably be limited to the minimum of NumCPU and GOMAXPROCS. If someone has multiple cores, but manually sets GOMAXPROCS=1, then we'll have concurrent goroutines that will be fighting for a single active OS thread.

@jwilder
Copy link
Contributor Author

jwilder commented May 13, 2016

Maybe runtime.GOMAXPROCS(0) then? Should default to NumCPU unless changed.

@joelegasse
Copy link
Contributor

For Go 1.5+, yes, just checking the value of GOMAXPROCS should work.

@joelegasse
Copy link
Contributor

LGTM 👍

@jwilder jwilder merged commit 1bfc832 into master May 13, 2016
@jwilder jwilder deleted the jw-shard-load branch May 13, 2016 21:55
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.

3 participants