-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Speed up the process of copying drv files to the remote host #62
Comments
The export / import might somewhat resemble this pipeline:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
When deploying changes with
deploy_nixos
a large portion of the deploy time is spent copying .drv files to the remote host. These files are very small, there are often very many of them, and round-trip latency ends up accounting for most of the time spent.Describe the solution you'd like
According to #nixos on Matrix, the
nix-copy-closure
protocol is "very chatty" (ie, has many round-trips) because it tries not to send any objects that the remote already has and it tries not to send anything that the remote doesn't already have all dependencies for.When
buildOnTarget
is set,deploy_nixos
runsnix-copy-closure
innixos-deploy.sh
specifically to copy derivations only. Instead of usingnix-copy-closure
in this case, it could perform an export, transfer the export, then perform an import. This would be a much less "chatty" exchange and largely eliminate the effects of round-trip latency. Since drvs are small, the penalty of possibly transferring some which do not need to be transferred is minimal. An entire NixOS system's drvs might amount to 30MB or 40MB.This option could be guarded by a configuration toggle if there's some desire to put the choice about this trade-off into the end-user's hands.
Describe alternatives you've considered
None
Additional context
None
The text was updated successfully, but these errors were encountered: