On Fri, Jul 28, 2023, 19:05 Keith Lofstrom <[email protected]> wrote:
> Snip - looking for the question... > > "Optimum SSD swap? ?? ???" > . My recommendation depends on your filesystem: a. No COW filesystems such as ext*, xfs, ... --> use swap file of pre-allocated size. It is more flexible (you can adjust size) and there is no speed down side. b. COW filesystems such as btrfs, zfs - use pre-allocated swap file and disable COW for the file OR (possibly better/neater) create swap subvolume with disabled COW I use swap subvolume on hosts with btrfs or ext4 swapfile for some cloud instances. If you need suspend to work, swap neds to be >= RAM, else chose smaller depending on RAM and disk size constraints. In general, swap (even 1/2 or 1/4 RAM) is a good thing if you do not like hard to explain, sudden application crashes after unaccessible host due to OOM kernel protection. I use 500GB swap on 2TB RAM hosts, 16GB on hosts with 32GB RAM, down to 1GB on 2GB RAM virtual/cloud hosts. Hope that helps somewhat, Tomas >
