-
-
Notifications
You must be signed in to change notification settings - Fork 63
Use nix-store --export/import instead of nix-copy-closure for build-on-target case #63
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
Conversation
LGTM / I like this 👍 |
I wonder if there's something else I can do to help this get merged. |
Maybe we should migrate this repository to the https://github.com/nix-community organization if it’s unmaintained, then more contributors can be added. |
See #64 |
Hey @adrian-gierakowski ! |
@smulikHakipod would you be able to add a terraform var to allow user to choose which method of copying should be used, and set the default value to the original implementation. Thanks! |
Yeah, sure, will do it on Tuesday |
Note that
|
Thanks for the info @edolstra! @smulikHakipod we should probably point out the above in the terraform var description. @exarkun given the above info, maybe there is a way you could fix your problem without introducing dependency on a deprecated feature? |
It looks like the performance improving feature was added to a version of nix that came out after this issue was filed? Then maybe If that interpretation sounds right, I might be able to do some performance testing with a new version of nix to see if this is the reality or not - though it might be a while before I get around to doing so (but the issue is already years old so that seems fine). |
I will have a look in nix-copy-closure now |
Using |
It looks like #76 should entirely supersede this. |
Fixes #62
I've tested this with a number of deployments for a host that runs GitLab and its dependencies. My latency to the target server is around 100ms and my upstream bandwidth to it is around 20Mbit/sec. I use
build_on_target = true
. On master@HEAD it takes about 11 minutes to copy all of the derivations for the system for a GitLab upgrade and 3-4 more minutes to finish the deployment. On this branch the 11 minute step becomes a 20-30 second step and the total deployment finishes in 3-4 minutes instead of 14-15 minutes.However, sometimes the deployment fails during the
--export/--import
step with an ssh error that I haven't diagnosed yet. Even when I have to restart the deployment because of this the result is still ~10 minutes faster than on master@HEAD (though I would sure like to fix whatever is causing that failure).