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
_______________________________________________
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to