disko icon indicating copy to clipboard operation
disko copied to clipboard

Disko-install: nixBuild runs out of memory and gets killed

Open dot-file opened this issue 10 months ago • 4 comments

nixBuild that is run here runs out of memory which causes disko-install to fail.

I have 8 gigs of RAM and running disko and nixos-install separately works just fine.

I also noticed that even after disko-install exits and I don't run anything else 2.5 gigs are still consumed by something I was unable to define with btop.

dot-file avatar Jan 23 '25 23:01 dot-file

Disko currently needs to evaluate NixOS twice. So more resources are required to make compared to nixos-anywhere. This is because we need to extend the original system with disks overridden: https://github.com/nix-community/disko/blob/bf0abfde48f469c256f2b0f481c6281ff04a5db2/install-cli.nix#L48

I don't see an easy way around that if we want to be able change disk names. I think you would need to use the disko cli and nixos-install separately

Mic92 avatar Jan 24 '25 19:01 Mic92

using zram?

  zramSwap = {
    enable = true;
    memoryPercent = 150;
  };

sedlund avatar Jan 25 '25 07:01 sedlund

Have enabled zram still now i get out of storage error, where as if i partition using disko then install via nixos-install everything is fine.

niksingh710 avatar Feb 05 '25 06:02 niksingh710

maybe limit number of jobs at once?

DrTeagle avatar Mar 04 '25 20:03 DrTeagle