On Friday, February 28th, 2025 at 8:04 AM, Dennis Boone <drb(a)msu.edu> wrote:
I’m probably a
lost soul on this issue, but swap space is just a way
to turn program bugs into performance problems.
You're hardly the only one. Some years ago, running Linux web and
database servers, I quit creating swap space. A runaway program would
turn the system into an infinite game of shuffle-the-pages well before
the OOM killer actually decided to kill something, and in that state,
one couldn't even reboot. This expanded the time window of "broken"
from tens of seconds, and perhaps a service restart, into tens of
minutes and a power button recovery. Every #$%^&* time.
De
I've read several bits of guidance lately suggesting avoiding swap due to the
increasing prevalence of solid-state memories. The assertion is that I/O heavy swapping,
especially if you get into a thrashing state, is liable to age current storage
technologies much more than it would have in the platter disk era. I've heard
contrary opinions that it isn't as large of a liability in reality. I haven't
settled on one or the other, I keep a swap file around on the microSD that runs my RPi,
but I've only needed to swapon, like OP, when compiling gcc.
- Matt G.