-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
max-jobs option is ignored #3763
Comments
Seems I'm running into this problem now as well. |
I am also experiencing this bug, I think, on
on Darwin. Further, building texlive now takes far too long (i.e., does not complete in many minutes, on a single-user install), I think due contention resulting from hundreds or thousands of builder processes being spawned. /cc @balsoft |
Oh, sorry for breaking it :P Thanks for the ping, @mstone! I have taken a quick look at it and I think I know how to fix it; I will try to find some time, but can't promise anything. |
@balsoft -- not to worry, and thanks for taking a look at it! Two followup notes:
|
After 0ed946a, max-jobs setting (-j/--max-jobs) stopped working. The reason was that nrLocalBuilds (which compared to maxBuildJobs to figure out whether the limit is reached or not) is not incremented yet when tryBuild is started; So, the solution is to move the check to tryLocalBuild. Closes NixOS#3763
Hopefully fixed in #4064 |
Describe the bug
Running
nix build
on master ignores anymax-jobs
value set, either bynix.conf
,--option max-jobs n
or--max-jobs n
.Steps To Reproduce
nix build -j2 -f =(echo 'with import <nixpkgs> { }; with lib; map (n: runCommand "test-${n}" { } "sleep 10") (genList toString 50)')
number of nixbld users
builds run at the same timeor
nix build --store /tmp/nix-store -j2 -f =(echo 'with import <nixpkgs> { }; with lib; map (n: runCommand "test-${n}" { } "sleep 10") (genList toString 50)')
Expected behavior
Only two parallel builds should run.
nix-env --version
outputnix-env (Nix) 2.4pre20200626_b481d8a
( B4dM4n/nix@b481d8a current flakes branch + minor change)Additional context
Building via
nix-daemon
will start one build for everynixbld
user, otherwise there is no limit on the number of jobs started.https://hydra.nixos.org/eval/1588015 is the first build I could find that show this behavior, which would point to #3564 introducing this.
The text was updated successfully, but these errors were encountered: