-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
nix copy runs in non-constant memory when destination is file #2774
Comments
I also experience |
I marked this as stale due to inactivity. → More info |
Is there any plan to do anything about this? |
Here are my measurements for a test run, copying
As you see, no improvement. 13+ minutes and ~2.5 GB of memory to download 193 MB and extract/copy 2.2 GB seems excessive. I let the scripts from https://discourse.nixos.org/t/using-nixos-in-an-isolated-environment/3369/19 run for several days before giving up - it spent hours stuck on big packages. This is holding up my workflow. Let me know if there's any other measurements that would be helpful. |
Try
Also, note that binary caches use XZ compression by default, which is slow. Try adding
|
Yes, the memory problem seems sorted with
I'm sure I will also find the Thank you @edolstra ! |
I marked this as stale due to inactivity. → More info |
I haven't checked the |
The issue is a subset of #1681, perhaps which was solved for other kinds of destinations but
file:///
.nix
version: 2.2.I try the following command:
It's quickly observable with tools like
htop
that the memory usage grows proportionally to the size of currently downloaded parts of files which are not downloaded (or written to disk) fully yet. Most likely it's the uncompressed size. I mean the number1161.2
out of1774.2 MiB
here:Originally I observed the issue running such
nix
copy
on NanoPi Neo2 with 512 MiB RAM. It runs extremely slow by spending most of the time to swapping, giving little chance to finish in half a month.The text was updated successfully, but these errors were encountered: