Funny watching someone advocate going back to something that sucked when we have far more performant hardware today which makes most of the other stuff wholly irrelevant.
Stop making swap partitions—use swap files instead
111–120 of 256 posts
Re: Stop making swap partitions—use swap files instead
#112Re: Stop making swap partitions—use swap files instead
#113Re: Stop making swap partitions—use swap files instead
#114Swap files are also much easier to set up than partitions if you're using full disk encryption.
Re: Stop making swap partitions—use swap files instead
#115[flagged]
Re: Stop making swap partitions—use swap files instead
#116Earlier quoted context omitted.
... which then kills sshd, locking you out of being able to get in and do any recovery.
the system will restart sshd?
Re: Stop making swap partitions—use swap files instead
#117Re: Stop making swap partitions—use swap files instead
#118Btrfs has a workaround: it can create a cow-disabled subvolume for the swapfile.
AFAIK you need a separate partition for Zfs.
Re: Stop making swap partitions—use swap files instead
#119Earlier quoted context omitted.
> does anyone know why In a nutshell, overcommit. It's more or less broken by design but it's also incredibly practical so pretty much everyone does it. Couple that with the fact that it's difficult bordering on impossible to correctly determine the culprit. If you've got 16 GB RAM and the user launches 3 processes each of which attempts to use 8 GB who should you kill?
Notably windows doesn't use overcommit, and degrades much more gracefully under memory pressure. The biggest tradeoff is the amount of disk space consumed by a page file that also has to reserve space for unused pages that have been allocated but never been swapped in. On linux you can turn overcommit off, but there's too much software written around the assumption that overcommit is on
I'm sure there are many reasons why Linux can't do that by default, but it's a real shame.
Re: Stop making swap partitions—use swap files instead
#120Earlier quoted context omitted.
If you want to share step-by-step, I’ll update the gist.
That’s my point, it’s different for each distro & partitioning setup, so I wouldn’t know what to share here. Having a swap partition makes it as easy as adding `resume=/dev/sdXYZ` or `resume=UUID=…` to your kernel parameters.
Given that every r/w filesystem you're going to use as your '/' on a Linux desktop or server supports online growing (and most support offline shrinking), it's nuts to me to hear people worrying about getting partition sizes correct. With LVM, if you get it wrong you just resize the LV and the filesystem it contains.
Hell, LVM makes swapping out disks a really easy online operation. [0] If you don't have nice hot-swap drive caddies, you might have to power off the box once to add in the new disks and again to remove the old ones, but all the data transfer can happen while the system is in use.
[0] Assuming the new and old disks have the same logical sector size, which they usually do.