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

use sysctl on FreeBSD to find the amount of online processors #2186

Merged
merged 1 commit into from Jun 10, 2015

Conversation

hannesm
Copy link
Member

@hannesm hannesm commented Jun 9, 2015

as mentioned in #2180 getconf _NPROCSSOR_ONLN does not work on FreeBSD, but sysctl -n hw.ncpu does.

@hannesm
Copy link
Member Author

hannesm commented Jun 9, 2015

tested by moving .opam away, and after a opam init, jobs: 4 occured in .opam/config.

@AltGr
Copy link
Member

AltGr commented Jun 10, 2015

Thanks! Probably worth posting back to stackoverflow ?

AltGr added a commit that referenced this pull request Jun 10, 2015
use sysctl on FreeBSD to find the amount of online processors
@AltGr AltGr merged commit 4b09081 into ocaml:master Jun 10, 2015
@hannesm hannesm deleted the fix-cpu-count-on-FreeBSD branch June 10, 2015 06:31
@dbuenzli
Copy link
Contributor

I made an update to stackoverflow answer.

@avsm
Copy link
Member

avsm commented Jun 13, 2015

could we make the overall cpu count usage to be ncpus - 1? It's irritating when all interactivity disappears because all CPUs are used by OPAM.

@AltGr
Copy link
Member

AltGr commented Jun 13, 2015

wow, does that really happen ? What arch ? Maybe with an ssd ? I generally use [ncpus*3/2] without trouble, assuming there is a lot of i/o !

We should be careful not to use that formula on single-core machines :D

@AltGr
Copy link
Member

AltGr commented Jun 13, 2015

(or less: https://lkml.org/lkml/2012/3/31/131)

@hannesm
Copy link
Member Author

hannesm commented Jun 13, 2015

@dbuenzli thanks!

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

4 participants