Swap: Difference between revisions
m Format swapDevices snippet according to nixpkgs-fmt |
Phanirithvij (talk | contribs) recommend swapspace |
||
| Line 57: | Line 57: | ||
Instead you should set up a swap partition or swapfile on a non-ZFS filesystem.<ref>https://utcc.utoronto.ca/~cks/space/blog/solaris/ZFSForSwapMyViews</ref> | Instead you should set up a swap partition or swapfile on a non-ZFS filesystem.<ref>https://utcc.utoronto.ca/~cks/space/blog/solaris/ZFSForSwapMyViews</ref> | ||
=== Tips and Tricks === | |||
[https://github.com/Tookmund/Swapspace Swapspace] is a dynamic swap space manager for GNU/Linux. i.e. it allows unused disk space to be utilised as swap to handle the occasional memory-intensive task, and frees the disk space once done. | |||
Enable it via <code>services.swapspace.enable = true;</code> in your nixos configuration. | |||
Check that <code>systemctl status swapspace.service</code> is green, it will auto manage swap for you. | |||
See all the options it supports here, [https://search.nixos.org/options?query=swapspace search.nixos.org] | |||
Can use zramSwap along with this service. | |||
See your active swap partitions/files with `swapon`. | |||