Skip to content

libstore+nix-build: add load-limit setting and use its value for NIX_LOAD_LIMIT en var#8105

Open
aviallon wants to merge 1 commit intoNixOS:masterfrom
aviallon:feature/add-load-limit-setting
Open

libstore+nix-build: add load-limit setting and use its value for NIX_LOAD_LIMIT en var#8105
aviallon wants to merge 1 commit intoNixOS:masterfrom
aviallon:feature/add-load-limit-setting

Conversation

@aviallon
Copy link
Copy Markdown

Fixes #7091

Motivation & Context

As explained in issue #7091, NixOS/nixpkgs#192447 removed -l flag from all buildsystem invocations in nixpkgs, in order to improve Hydra efficiency.

However, this had several drawbacks, as this removed the ability to limit CPU load, causing OOM issues or extreme system loads in some bad scenarios (ninja buildsystem building something with -flto=auto enabled).

This patch aims to reintroduce the possibility to limit system load (together with PR NixOS/nixpkgs#192799), while still allowing Hydra to have full build efficiency.

Checklist for maintainers

Maintainers: tick if completed or explain if not relevant

  • agreed on idea
  • agreed on implementation strategy
  • tests, as appropriate
    • functional tests - tests/**.sh
    • unit tests - src/*/tests
    • integration tests - tests/nixos/*
  • documentation in the manual
  • code and comments are self-explanatory
  • commit message explains why the change was made
  • new feature or incompatible change: updated release notes

Priorities

Add 👍 to pull requests you find important.

…LOAD_LIMIT env var

Aimed at solving issue NixOS#7091

Signed-off-by: Antoine Viallon <antoine@lesviallon.fr>
emilazy added a commit to emilazy/nix that referenced this pull request Jul 20, 2024
Closes: NixOS#7091
Closes: NixOS#6855
Closes: NixOS#8105
Co-authored-by: Alex Wied <centromere@users.noreply.github.com>
emilazy added a commit to emilazy/nix that referenced this pull request Jul 20, 2024
Closes: NixOS#7091
Closes: NixOS#6855
Closes: NixOS#8105
Co-authored-by: Alex Wied <centromere@users.noreply.github.com>
emilazy added a commit to emilazy/nix that referenced this pull request Jul 20, 2024
Closes: NixOS#7091
Closes: NixOS#6855
Closes: NixOS#8105
Co-authored-by: Alex Wied <centromere@users.noreply.github.com>
@emilazy
Copy link
Copy Markdown
Member

emilazy commented Jul 20, 2024

Linking #11143 here for any subscribers to this.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow configuration of load limit for nix builds

2 participants