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

Change nix.maxJobs default to reflect remote builds #79183

Closed

Conversation

Gabriella439
Copy link
Contributor

See: NixOS/nix#1216 (comment)

This ensures that remote builds don't inadvertently exhaust the available
nixbld* users when dealing with over 32 cores

Things done

I did an ad-hoc test of this change against the following file:

let
  nixos = import ../nixpkgs/nixos {
    system = "x86_64-linux";

    configuration.nix = {
      distributedBuilds = true;

      maxJobs = 32;

      buildMachines = [
        { hostName = "example.com";
          sshUser = "example";
          sshKey = "/root/.ssh/id_rsa";
          system = "x86_64-linux";
          maxJobs = 32;
          speedFactor = 1;
          supportedFeatures = [ "kvm" ];
          mandatoryFeatures = [ "perf" ];
        }
      ];
    };
  };

in
  nixos.config.nix.nrBuildUsers

Before this change the above file evaluates to 32. After this change it evaluates to 64. When I set distributedBuilds to false the result changes back to 32.

See: NixOS/nix#1216 (comment)

This ensures that remote builds don't inadvertently exhaust the available
`nixbld*` users when dealing with over 32 cores
Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

diff LGTM

@edolstra
Copy link
Member

edolstra commented Feb 4, 2020

Hm, this does not make sense to me. Remote builds do not allocate a build user (see build.cc, the only place where we allocate a build user is in DerivationGoal::startBuilder()).

@Gabriella439
Copy link
Contributor Author

@edolstra: Oh, perhaps I misdiagnosed what is going on. I can close this pull request, then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants