nixos-installer swapfile #23

Closed
opened 2025-12-28 23:18:54 +01:00 by adam · 2 comments
Owner

Originally created by @bananabr34d on GitHub (Jan 10, 2024).

Hi Ryan,

I've really enjoyed your book and reading your thorough notes in the config files. When reviewing your nixos-installer I noticed that you are creating a 96g swapfile. This seemed excessive to me and I was wondering what the rationale is. I know you are using impermanence and loading into tmpfs, so perhaps its due to system compiling downloads?

Also, sorry if this question isn't appropriate for github issues. Feel free to close and delete if you don't want to answer.

Originally created by @bananabr34d on GitHub (Jan 10, 2024). Hi Ryan, I've really enjoyed your book and reading your thorough notes in the config files. When reviewing your nixos-installer I noticed that you are creating a 96g swapfile. This seemed excessive to me and I was wondering what the rationale is. I know you are using impermanence and loading into tmpfs, so perhaps its due to system compiling downloads? Also, sorry if this question isn't appropriate for github issues. Feel free to close and delete if you don't want to answer.
adam closed this issue 2025-12-28 23:18:54 +01:00
Author
Owner

@ryan4yin commented on GitHub (Jan 10, 2024):

NixOS uses /tmp for compilation, and I have mount a btrfs subvolume to it, so it is sufficient.
This 96G swapfile is used for loading some big LLM models. Some LLM models are often 30G ~ 80G in size, and I don't have enough memory.

It's true that such a big swapfile is not common.

@ryan4yin commented on GitHub (Jan 10, 2024): NixOS uses /tmp for compilation, and I have mount a btrfs subvolume to it, so it is sufficient. This 96G swapfile is used for loading some big LLM models. Some LLM models are often 30G ~ 80G in size, and I don't have enough memory. It's true that such a big swapfile is not common.
Author
Owner

@bananabr34d commented on GitHub (Jan 10, 2024):

Thanks for the feedback and again, thanks so much for your NixOS book and this repository. You have greatly helped me on my Nix journey.

@bananabr34d commented on GitHub (Jan 10, 2024): Thanks for the feedback and again, thanks so much for your NixOS book and this repository. You have greatly helped me on my Nix journey.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/nix-config#23