[talk] Does swap still matter?

Charles Sprickman spork at bway.net
Thu Apr 7 16:46:40 EDT 2022



> On Apr 7, 2022, at 1:32 PM, John Baldwin <jhb at FreeBSD.org> wrote:
> 
> 
> FWIW, I still configure swap on systems I install, but really it's just to
> allocate space to hold kernel crashdumps, not because I really need/want
> swap.

I’m in the same habit, and I’m generally fairly generous on anything where space isn’t scarce (but on the odd “cloud” VM, I’m much more stingy as storage is pricey).

A few questions, as I’ve been at this long enough that some of my information is probably outdated:

- Is there a formula for how much swap space to allocate to be able to always fit the full kernel dump? I have one server at home that’s had a few issues, and with 8GB of RAM (which generally sees at least half of that being used by zfs ARC), my vmcore files are around 4GB. Curious what I’d see on a host with 64GB or 128GB of RAM.

- With SSDs being so common, especially for “boot” drives where swap would likely live, are there any special considerations? Do swap partitions get TRIM support? I also assume SSDs make a system going into swap due to physical memory exhaustion suffer far less than it would with spinny drives that are thrashing around between swap at the beginning of the drive and other data being spread out all over the remainder of the drive (but could also eat up your precious write cycles if swap usage is not being monitored).

- Anywhere I have multiple drives, I always mirror my swap, using gmirror. Any drawbacks to mirroring? Is gmirror still the only proper option for this?

- Is swap on zfs advisable in any situations yet?

Charles

-- 
Charles Sprickman
NetEng/SysAdmin
Bway.net - New York's Best Internet www.bway.net
spork at bway.net - 212.982.9800

> 
> -- 
> John Baldwin
> 
> _______________________________________________
> talk mailing list
> talk at lists.nycbug.org
> https://lists.nycbug.org:8443/mailman/listinfo/talk



More information about the talk mailing list