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

install-multi-user: reduce max-jobs from 32 to 1 #2746

Merged
merged 2 commits into from Jun 17, 2019

Conversation

bjornfor
Copy link
Contributor

And follow up by removing settings that are set to the same value as Nix' built-in defaults.

Having max-jobs = 32 ($NIX_USER_COUNT is hardcoded to that value) may
severely overload the machine. The nix.conf(5) manual page says max-jobs
defaults to 1, so let's use that value.

NOTE: Both max-jobs and cores are now being set to their default value,
so they can be removed alltogether.
Hardcoding the "max-jobs" and "cores" settings in nix.conf at install
time, to the same value as Nix' built-in default, makes little sense to
me.
@edolstra edolstra requested a review from grahamc March 27, 2019 19:57
@bjornfor
Copy link
Contributor Author

A colleague of mine had to reboot their machine due to the multi-user installer having this high default max-jobs value; nix-build was thrashing the machine. This does not give a good impression of Nix. Please review and merge :-)

@bjornfor
Copy link
Contributor Author

Bump and xref #2749.

@vmandela
Copy link
Contributor

I would recommend this as well. The number of build users (32) is too large. If we dont want to hardcode it, $(nproc) might be a reasonable alternative.

@edolstra edolstra merged commit 38a4d38 into NixOS:master Jun 17, 2019
@bjornfor bjornfor deleted the install-multi-user-defaults branch June 17, 2019 11:14
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

3 participants