[Nix-dev] Please test Nix store auto-optimise

Harald van Dijk harald at gigawatt.nl
Thu Feb 12 14:28:42 CET 2015


On 12/02/2015 11:47, Wout Mertens wrote:
> the Nix store can be optimised by hard-linking files with the same 
> contents together, so they are only stored once. This is done by 
> reading all the files in your store, calculating their checksums and 
> linking them to /nix/store/.links/*[checksum]*. This is especially 
> useful in Nix where differing build inputs for a package end up with 
> many of the same files.
>
> Nix 1.8 has a few optimizations that make this operation very fast if 
> you run it multiple times. Nix also has the auto-optimise-store 
> setting, which will link new files added to the store. If your store 
> was optimised, it stays optimised.
>
> I feel this optimisation should be turned on by default but there were 
> some regressions in the past which is why it wasn't. Therefore I'd 
> like to ask you to turn on auto-optimise and run optimisation once. 
> Your disk space and memory footprint will thank you.
>
> ...
>
> Please report any issues you encounter, and it would be nice if you 
> reply to this mail in a while to report that you have encountered no 
> issues.
I've already been using this for a while. I haven't had any issues while 
building, and the space savings are worth it. One thing worth pointing 
out is that it makes (or at least seems to make) nix-collect-garbage 
need more time to complete.

Cheers,
Harald van Dijk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150212/b7ff2cb7/attachment.html 


More information about the nix-dev mailing list