Does /nix on HDD cause bottleneck?

Hello, I wanted to ask anyone who ever install NixOS in hybrid setup. Does placing the whole system (root) in SSD and mounting the /nix into a harddrive give bottleneck performance on boot? I read the stages NixOS scripts but doesn’t quite understand on what it does.

I would almost always do the exact opposite, because reading programs from /nix/store will usually be the most expensive for your setup. That said, once you’re up and running with every application, it may not matter much to you unless you boot often. Your best bet is to time both setups yourself, or consider using the SSD as a cache in front of your harddisk, or something like that. There are many parameters in play. For instance, I might prefer having my database in /var be fast, and suffer a slightly slower boot time.

I have never tried this, but just to give another pointer for this idea, you could use bcache to make the SSD a read/write cache for the spinning platter:

https://bcache.evilpiepirate.org/

3 Likes

@srhb Oh you’re right but I think caching the HDD is the way to go. For me, HDD is there to accommodate the bulky store (lot goes there!).

Thanks for the pointer @danieldk.

Won’t caching only help for the files most frequently accessed? I’d imagine files used mostly only at boot wouldn’t get cached.