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
remote instantiation (NIX_REMOTE
, --store
) is an order of magnitude slower than local instantiation + nix copy
#10119
Comments
@Atemu does that also happen with |
Indeed it does not! $ nix run nixpkgs#hyperfine -- -w 1 -- "nix-instantiate -A hello --system x86_64-linux --store ssh-ng://remote --eval-store auto"
Benchmark 1: nix-instantiate -A hello --system x86_64-linux --store ssh-ng://remote --eval-store auto
Time (mean ± σ): 261.7 ms ± 9.7 ms [User: 134.4 ms, System: 46.2 ms]
Range (min … max): 251.1 ms … 284.9 ms 11 runs
Thanks :) What is this wizardry and why don't I cast it by default? Can I make that the default somehow? I don't want to have to specify it on every invocation that does a remote build. |
Using
Apparently not, because More broadly, this |
Related: #6893 |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2024-03-04-nix-team-meeting-minute-130/40830/1 |
Describe the bug
A clear and concise description of what the bug is.
When doing remote builds, instantiation time is unreasonably long (many seconds for a simple package). About an order of magnitude slower in fact:
Steps To Reproduce
nix copy $(nix-instantiate -A hello --system x86_64-linux) --to ssh-ng://remote
nix-instantiate -A hello --store ssh-ng://remote
Expected behavior
A clear and concise description of what you expected to happen.
Remote instantiation should be the same speed or faster than local instantiation + copy.
Rationale for faster than local + copy: .drv files should not need to be written locally during a remote build (certainly not in the hot path), saving many IOPS.
nix-env --version
outputAdditional context
During remote instantiation, there appears to be a constant 1Mbit/s upload stream, no matter whether I previously instantiated the exact same drv or not.
Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: