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

Wout Mertens wout.mertens at gmail.com
Sat Apr 25 12:08:33 CEST 2015


I opened https://github.com/NixOS/nix/issues/377 a while ago and then I ran
some small tests and it didn't seem to matter. The links dir is of course
huge but it still performs fine on sane filesystems. IIRC, the only time
you do readdir on it is during GC to remove the ones with 1 link count.

Wout.

On Sat, Apr 25, 2015 at 3:16 AM Jascha Geerds <jg at ekby.de> wrote:

> Thank you for the hint, that saved 12GB on my machine. Anyway, wouldn't
> it be better if we use an extra level of directories to reduce the size
> of /nix/store/.links ?
>
> > $ ls -l /nix/store/.links/ | wc -l
> > 374716
>
> "ls" is quite slow and this is just my desktop machine and not a busy
> server like hydra or something like that. Such a huge directory would
> kill slower file manager or other applications. I just think of
> PyCharm's "open file" dialog which sometimes tries to open my
> /nix/store... this operation freezes the application so that I have to
> kill it.
>
> For example git or git-annex introduced an extra level of directories to
> reduce the amount of files inside a single directory. Something like
> this:
>
> $ tree --charset=ascii /tmp/nix/store/.links/
> /tmp/nix/store/.links/
> |-- aab
> |   |-- aab4f31a9b3119c2f6bb3b45c27c4cb33ff45a8f6e2
> |   `-- aabd31b843d1faf29e4d3e50c135d6539ac9fe77ffd
> |-- aal
> |   |-- aal4f31a9b3119c2f6bb3b45c27c4cb33ff45a8f6e2
> |   `-- aald31b843d1faf29e4d3e50c135d6539ac9fe77ffd
> |-- ace
> |   |-- ace4f31a9b3119c2f6bb3b45c27c4cb33ff45a8f6e2
> |   `-- aced31b843d1faf29e4d3e50c135d6539ac9fe77ffd
> |-- ehw
> |   |-- ehw4f31a9b3119c2f6bb3b45c27c4cb33ff45a8f6e2
> |   `-- ehwd31b843d1faf29e4d3e50c135d6539ac9fe77ffd
> |-- eia
> |   |-- eia4f31a9b3119c2f6bb3b45c27c4cb33ff45a8f6e2
> |   `-- eiad31b843d1faf29e4d3e50c135d6539ac9fe77ffd
> |-- ial
> |   |-- ial4f31a9b3119c2f6bb3b45c27c4cb33ff45a8f6e2
> |   `-- iald31b843d1faf29e4d3e50c135d6539ac9fe77ffd
> `-- ode
>     |-- ode4f31a9b3119c2f6bb3b45c27c4cb33ff45a8f6e2
>     `-- oded31b843d1faf29e4d3e50c135d6539ac9fe77ffd
>
> 7 directories, 14 files
>
>
> --
>   Jascha Geerds
>   jg at ekby.de
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150425/63225833/attachment.html 


More information about the nix-dev mailing list