4 ms·
It's not like it's easy to shuffle partitions around. Swap files are a pain, so you need to reserve space at the end of the table. By the time you need to incre
by ZoomZoomZoom 8mo ago
It's not like it's easy to shuffle partitions around. Swap files are a pain, so you need to reserve space at the end of the table. By the time you need to increase swap the previous partition is going to be full.
Better overcommit right away and live with the feeling you're wasting space.
- man8alexd 8mo agoExactly opposite. Don't use swap partitions, and use swap files, even multiple if necessary. Never allocate too much swap space. It is better to get OOM earlier then to wait for unresponsive system.
- ZoomZoomZoom 8mo agoSwap partition is set and forget. Can be detected by label automatically, never fails. Swap file means fallocating, setting extended attributes (like `nocow`), finding file offset and writing it to kernel params, and other gotchas, like btrfs not allowing snapshotting a subvolume with an active swap file. Technically it's preferable, won't argue with that.
- direwolf20 8mo agoHast thou discovered our lord and savior LVM?
- rascul 8mo ago> Swap files are a pain Easier than partitions: mkswap --size 2G --file swap.img swapon swap.img
- ZoomZoomZoom 8mo agoYeah, until you need to hibernate to one. I understand that calculating file offsets is not rocket science, but still, all the dance required is not exactly uninvolved and feels a bit fragile.