-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to build a mirror of cache.nixos.org or anything else to speed up nixos-install? #32659
Comments
What country? Here is some info on how to set up a mirror: https://nixos.org/nix-dev/2016-October/022029.html |
Well, in China, there has a GFW= =|| |
@OlingCat: you may try https://cache.nixos.community instead of https://cache.nixos.org . It's only experimental service located in Europe for now, built on WIP around http://github.com/NixIPFS (note: using IPFS for mirroring was dropped for now, as it seems not suitable yet) I hope we will be able to make a better usable community CDN during 2018. |
Is it possible to Also is it possible to clone the s3 bucket? The second provider listed below says that they would be able to |
@edolstra I'm quite confused with the command I wonder if |
@shankerwangmiao: the |
@edolstra Note that our mirror would be public, so probably would help other people too :) |
@pallavagarwal07: it uses the job-level parallelism, not distinguishing between pure downloads and other jobs. See |
@vcunat |
@pallavagarwal07: hmm, that should be all OK. You use https://cache.nixos.org right? (https to get http/2 IIRC) |
I am using HTTP (I had made a docker without SSL certs :P ) |
|
@edolstra |
Okay, for future reference, I think I managed to get it to work as follows:
|
@pallavagarwal07 Maybe check out this? https://nixos.org/nix/manual/#binary-cache-format-and-operation It says how binary caches work. I think you can just download the |
@dramforever Thank you!! That's exactly what I needed to know. I don't know how I missed it, I must've read the manual at least 5 times. |
BTW, there's some set of mirror scripts already (preliminary but tested) https://github.com/NixIPFS/nixipfs-scripts/tree/master/nixipfs (Don't get confused by "ipfs" in the name; that technology turned out not to be suitable yet.) |
Can we close this? Seems like it has been answered to a sufficient degree, and there has been no activity for 6mo. |
Well, I suppose. One way is to use an http(s) proxy, though you won't get speed-up on the first download. For example, last month I tried free CloudFlare's, but it's hacky as they assume you will redirect public DNS to their nameservers – still, it worked okay over plain http when I overrode DNS locally. I expect I can divulge that over the long term you may expect changes around the CDN for cache.nixos.org, and I believe that will result in more consistent performance all over the world. |
Perhaps now you might have much better performance in China (and elsewhere): https://groups.google.com/forum/#!topic/nix-devel/S6kx0d2_b3Y |
唉~ |
(TL;DR: We are thinking of mirroring channels and cache.nixos.org again because of renewed interest. Please review this gist on how we are planning it: https://gist.github.com/dramforever/d2ff99318c70f44149db6070a87da5a0) There has been some renewed interest in a mirror in the Chinese Nix community. (Even since the switch to Fastly, cache.nixos.org is still not ideal (still much slower than other distros), and the improvement seems have occurred only in random regions, probably depending on the ISP.) We have created a mirroring script and a supporting environment, and currently TUNA and USTCLUG, hosters of two prominent open source software mirror sites in China (TUNA's mirror, USTC's mirror) are interested in running such a mirror for Nix packages. (TUNA is having other issues at the moment and is unable to do so in the short term.) We are ready for some initial testing. But we would like to request official review from the NixOS team before we do so. Mirroring entire channels is no small task and we hope that communication will help it to go smoothly. Also, we just might be doing something wrong, and we really hope someone knowledgeable can point it out. Information regarding how we are planning to mirror, a few links, and other things can be found in this gist, and we will keep it up to date. We request a review of what will be doing in order to minimize risk of mistakes and surprises. Also, please tell us if you need additional information about our mirrors before we start. Thanks for creating the amazing Nix ecosystem, and thanks in advance for your assistance. |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/requesting-review-before-starting-nixos-mirror-in-china/5514/1 |
Looks good to me. However, you may want to avoid using
|
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/announcing-tuna-nix-mirror/6144/2 |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: |
Issue description
The downloading speed of nix in my country is too slow, about 5~50KB/s. Is there a way to speed it up?
eg. build a mirror, use multi-connection download tools, etc.
The text was updated successfully, but these errors were encountered: