[Nix-dev] Please test Nix store auto-optimise
Vladimír Čunát
vcunat at gmail.com
Sun Feb 22 18:55:25 CET 2015
On 02/15/2015 09:54 AM, James Cook wrote:
> Hard linking is an impurity which can
> cause bugs, as Wout pointed out at the start of the thread (e.g.
> https://github.com/NixOS/nixpkgs/issues/4266).
>
> Implementation question: how would nix know when it can delete a file
> in /nix/store/.links?
If you can find some difference by looking at the files (to find if it
shares some data), then it's an impurity. Maybe there are FS-specific
tools for such queries; or we could maintain the information in some
separate database, but that's probably too complex to be worth of
implementing (from my point of view).
For anyone interested in space cost of /nix/store/.links on btrfs:
I just tried to remove my ~0.6 mil. links, which freed ~0.19 GB space of
metadata (reported by btrfs fi df). That's fairly small amount compared
to the total usage of ~80 GB; moreover it's on rotating HDD, so the
difference should be even halved on an SSDs (no meta duplication in
there by default).
Vladimir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3251 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150222/e4133abe/attachment-0001.bin
More information about the nix-dev
mailing list