Is there still a good reasons for these defaults today? On my laptop, where I’ve made it a habit to run
nix-store --optimize
after every other or third nixos-rebuild, is there anything to consider before setting nix.autoOptimiseStore to true instead of continuing to manually invoke nix-store --optimize every now and then?
Note that it needs to checksum the files but even then that seems like a huge difference. Either the checksumming is super slow or your fs can’t handle the large directory of hardlinks. What fs are you using, and SSD or HDD?
Hmm, that’s quite a slow drive for random writes. Perhaps the hardlinks are causing way more fragmented writes? There are a ton of small files in nixpkgs.
In any case, doesn’t seem like an easy-to-diagnose issue.