[Tracking issue] Cgroups in Lix #537
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#537
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
With https://gerrit.lix.systems/c/lix/+/1936/8, we get a pretty OK story for cgroups on Linux.
I would like to discuss stabilization of cgroups (to enable by default, yes, yes) and what are the missing pieces.
Daemon and single user mode
The current situation is that you can run Lix bypassing the daemon, this means that it makes sense to continue using cgroups for the local user doing that.
In the future, we may just have a daemon colocated with the single user and this situation will disappear and reduce a bunch of non-DRY code.
Cgroups for non-builds
Not everything is a build, some things are substitutions that may lead to a build, for example.
We may still want to have
nix-daemon/nix-substitution/nix-build-uid-$uid
as a path here.Here's a list of things that can happen:
Delegation
We should probably use
nsdelegate
mount option and remount the cgroupv2 hierarchy in the sandbox setup, this avoids having to keep track of which files we need to chown to the builder (a TODO is in the code mentioned above).systemd remote control
We can let systemd do most of our job using
StartTransientUnit
, via a D-Bus dependency.More tests
We should probably test:
We want to ensure we can let operators do equal partition of build resources, etc.
cc @pennae @jade