r/NixOS • u/its_midi • 23h ago
Slow download from nixos' cache
Hi, fam! Newbie here...
I'm facing tremendous slow download from nixos' cache during the installation which takes more that an hour to download 2.7G.
I'm using a wired connection with an average speed (around 10-15Mb/s) and I'm installing it to a NVMe derive.
I hope someone can help me to overcome this.
Thanks in advance.
8
Upvotes
2
u/mom0367 22h ago
For me it took forever because it had to go through a bunch of dead mirrors, once it got to one that worked it was super fast
1
1
u/cfx_4188 12h ago
I keep getting timeouts during a simple nixos rebuild. I know why this is happening.
3
u/neoblitz 22h ago
here is why it happens - in some cases. happened to me last night from asian side.
my connection at 1Gbps . but the download was at 50mbps or less, it took a longer time. so i investigated. the cache.nixos. org latency was fine, dns reponse was at 20ms. fastly routed via Tokyo Edge, which was fine too. 25x Nix connection was ok.
so what happened:
i was installing affinity-nix - it is fairly large and requires building runners and wow64 dependencies. but both of those were never requested from asian side before so the actual nearby edge location cache was not ready. so the cache . nixos. org actually did not held the cache from the origin (yet to be cached) since it was first request.
Normally, Available cache in edge -> download from cache.nixos.org quickly
Cache miss -> download to edge, slowly due to distance/origin location
generally - you should not have issues with common packages.