Load limiting #603

Open
opened 2024-12-19 18:10:20 +00:00 by lunnova · 2 comments

It's currently not possible to configure a load limit for builds. For a long time the stdenv limited load to the same as cores, but this default restriction was removed.

Three attempts have been made to solve this in CppNix, some appearing to be ready, but they got stuck in review.

https://github.com/NixOS/nix/issues/7091

https://github.com/NixOS/nix/pull/11143#issuecomment-2385642400

I don't have a clear description of what I want, I'm not sure what a good solution is.
I think the above linked PR demonstrates a good solution assuming stdenv gets support added.

## Is your feature request related to a problem? Please describe. It's currently not possible to configure a load limit for builds. For a long time the stdenv limited load to the same as cores, but this default restriction was removed. Three attempts have been made to solve this in CppNix, some appearing to be ready, but they got stuck in review. https://github.com/NixOS/nix/issues/7091 https://github.com/NixOS/nix/pull/11143#issuecomment-2385642400 I don't have a clear description of what I want, I'm not sure what a good solution is. I think the above linked PR demonstrates a good solution assuming stdenv gets support added.
jade added the
E/requires rearchitecture
Area/remote-builds
Area/protocol
labels 2024-12-20 08:14:02 +00:00
Owner

In terms of build scheduling, if this is made responsibility of lix (i am not convinced it should necessarily be, given we have enough on our plate as it is) rather than something like Hydra (which, to be clear, has its own giant tech debt pile), it would require protocol changes to communicate the builder load and likely some serious redesign of the way that build-remote (and build-hook) works.

In terms of build scheduling, if this is made responsibility of lix (i am not convinced it should necessarily be, given we have enough on our plate as it is) rather than something like Hydra (which, to be clear, has its own giant tech debt pile), it would require protocol changes to communicate the builder load and likely some serious redesign of the way that build-remote (and build-hook) works.
Owner

Arguably, I think this is yet another hack and https://github.com/NixOS/nixpkgs/pull/314888 is the real solution here.

Unfortunately, we are stuck on upstreams not being mature enough so we could really benefit from a jobserver. If somefew could push the state of the art over there and bring forth a good protocol, we could get lovely performance benefits.

Arguably, I think this is yet another hack and https://github.com/NixOS/nixpkgs/pull/314888 is the real solution here. Unfortunately, we are stuck on upstreams not being mature enough so we could _really_ benefit from a jobserver. If somefew could push the state of the art over there and bring forth a good protocol, we could get lovely performance benefits.
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#603
No description provided.