<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, Feb 28, 2025 at 9:12 AM segaloco via TUHS <<a href="mailto:tuhs@tuhs.org">tuhs@tuhs.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Friday, February 28th, 2025 at 8:04 AM, Dennis Boone <<a href="mailto:drb@msu.edu" target="_blank">drb@msu.edu</a>> wrote:<br>
<br>
> > I’m probably a lost soul on this issue, but swap space is just a way<br>
> <br>
> > to turn program bugs into performance problems.<br>
> <br>
> <br>
> You're hardly the only one. Some years ago, running Linux web and<br>
> database servers, I quit creating swap space. A runaway program would<br>
> turn the system into an infinite game of shuffle-the-pages well before<br>
> the OOM killer actually decided to kill something, and in that state,<br>
> one couldn't even reboot. This expanded the time window of "broken"<br>
> from tens of seconds, and perhaps a service restart, into tens of<br>
> minutes and a power button recovery. Every #$%^&* time.<br>
> <br>
> De<br>
<br>
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.<br></blockquote><div><br></div><div>Swapping to flash can be fine. The days when a "spot" could be worn out are 20 years in the past. If you use it as a "shock absorber" to cope with transient loads, there's no issues.</div><div><br></div><div>However a lot depends on which kind of flash you have, you might have trouble if the load is constant. Today there's a wide range of flash drives. Ranging from < .1DWPD drives (you can't write even 10% of the drive's capacity in one day w/o wearing it out in the warranty period) to 3, 5 or 10 DWPD drives. 0.3 and 1.0 seem popular in the consumer / prosumer / low-end-datacenter space. Those can be a problem if you are constantly swapping (but again are fine for coping with transients).</div><div><br></div><div>The MicroSD is likely to be closer to the .1-.3 DWPD (unless you bought an expensive one).</div><div><br></div><div>Warner</div></div></div>