cachix / install-nix-action

Installs Nix on GitHub Actions for the supported platforms: Linux and macOS.
Apache License 2.0
517 stars 79 forks source link

--daemon-user-count 4? #79

Closed colinxs closed 3 years ago

colinxs commented 3 years ago

Is there a reason for --daemon-user-count 4 being including in the install flags? If not, could you either remove it or change it to the installer's default of 32? I have an update script that updates 100+ packages at once in parallel (with 32 threads) and it's erroring out because there's not enough builders.

domenkozar commented 3 years ago

That should definitely be a setting one can override.

It should default to a number of cores, and also set then maxJobs.

domenkozar commented 3 years ago

@colinxs are you running your own github runners?

colinxs commented 3 years ago

Nope, but since it's mostly IO Bound the two cores github provides is enough.

domenkozar commented 3 years ago

Agreed - making the user count configurable sounds good to me.

nomeata commented 3 years ago

I am hitting this due to

error: all build users are currently in use; consider creating additional users and adding them to the 'nixbld' group

so making this configurable would be nice.

domenkozar commented 3 years ago

@nomeata self hosted runners?

nomeata commented 3 years ago

No, github runners. A colleage claimed that --max-jobs 10 would help with our workload (I have my doubts as well on these rather weak machines). Still, might be nice to configure this. Or alternatively wait for 2.4 which will have https://github.com/NixOS/nix/pull/3564.

dysinger commented 3 years ago

I moved my build from my fork of this repo to this repo and this bit me again. I launched 4x (8 cpu x 32gb ram) and they fail to build with "error: all build users are currently in use; consider creating additional users and adding them to the 'nixbld' group"

domenkozar commented 3 years ago

How about defaulting to 2 * cpu cores and having an option to override it?

domenkozar commented 3 years ago

Released https://github.com/cachix/install-nix-action/releases/tag/v14

dysinger commented 3 years ago

On fresh Ubuntu LTS:

image

dysinger commented 3 years ago

The workaround is just to add another step to install python first

domenkozar commented 3 years ago

Huh, no python installed on Linux!

Not sure I can really fix this kind of thing as self-hosted runners will just always contain different set of software compared to hosted VMs.

Maybe it would be better to just rely on coreutils + kernel api.