nix collect-garbage
is kind of slow at deleting paths #418
Labels
No labels
Area/build-packaging
Area/evaluator
Area/flakes
Area/profiles
Area/remote-builds
Area/repl
Area/store
bug
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
RFD
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
ux
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#418
Loading…
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?
I bet it's entirely single threaded. We should look into that.
Redesign idea that would avoid a lot of rearchitecture (since the current gc preserves invariants like that paths always have their dependencies): run the GC in two parts: one thread, which is exactly identical to the current GC except it replaces the recursive-delete operation with another which moves paths into a garbage bin, say,
/nix/store/.garbage
, and adds it to a deleter queue. Then the deleter queue is consumed by a thread pool that does not care about ordering.The deleter queue is also initially populated with the current contents of the
.garbage
directory in case it is interrupted.By doing it this way, we get: