Skip to content

Conversation

@adeci
Copy link
Contributor

@adeci adeci commented Nov 13, 2025

Motivation

Another stab at the known issue involving parallel building on powerful machines with many cores.

This is a WIP draft implementation of the GNU make jobserver protocol I saw originally mentioned as a possible solution in #11143, although the load-limit setting from that pr may be a more generalized solution for this.

Another idea for this problem could involve some mechanism for resource allocation to the builder sandboxes themselves from the perspective of the system, starting minimal and ballooning resources as needed, and sleeping when they are not available. Ideally we can have some way to set a global hard cap on resource consumption.

Hacking on this at Thaigersprint/thaigersprint-2025#2

Context

Creates nix-daemon options use-jobserver and jobserver-tokens.

Places an impure FIFO populated with jobserver-tokens tokens when the nix-daemon is started if the use-jobserver option is enabled. Cleans up at termination.

The jobserver FIFO is added to sandbox paths for use by derivation builders with make.


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@github-actions github-actions bot added the new-cli Relating to the "nix" command label Nov 13, 2025
@adeci adeci marked this pull request as draft November 13, 2025 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-cli Relating to the "nix" command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant