[nmglug] To swap or not to swap;

ABQLUG community at abqlug.com
Mon Nov 4 07:57:39 PST 2019

Hi Ted,

You really want to use swap still, even in 2019. Whether you use a 
dedicated partition, or just a swap file. Have at least something. 
Chrome and Firefox can take more RAM up than expected these days.

When I was looking into why I should keep swap I came across the Ubuntu 
FAQ, and that convinced me: https://help.ubuntu.com/community/SwapFaq

How much RAM does that system have? How much storage space is the SSD 
going to provide? Are you going to ever use hibernation?

The kernel can handle running out of ram, but if you are bottlenecking 
the RAM, the kernel is going to pull more resources from disk (swap on 
or off). IMO, this makes SWAP some what of a mute point. The kernel 
knows that swap is not recommended, so it will minimize use already. For 
the ultra paranoid, you can configure swap to be even more restrictive.

I could see removing swap if you are extremely limited in space. But you 
can buy cheap QLC/TLC SSDs drives that are ~$100 for 1 TB. Even cheaper, 
come Black Friday. So I don't really see space being an issue.

If you are really paranoid about keeping the SSD healthy, I would 
probably buy a new MLC drive or a lightly used SLC drive. Read Samsung 
Pro * or Intel 750*. And make sure something is triggering TRIM every 
once in a while (1 month or less) which is common place to have already 
on by default these days.

For the average Joe, I usually tell them to not worry about what you do 
with the SSD. Unless you know you push out multiple gigabytes daily, you 
will likely never hit the expected write limit to the drive.

You can check the lifespan of most modern SSDs by looking at the SMART 
data. So you should have some form of a guess oh how healthy the drive 

Also, from prior research, you want to keep the drive powered on, vs 
having it act as cold storage. SSD rely on having a set voltage in 
cells. If the drive is powered off for an "extended" amount of time. 
(Think from months to years) The drive can potentially lose sectors due 
to low voltage.

~ Jared

On 2019-11-04 07:51, Ted Pomeroy wrote:
> NMGLugers, I have been helping with a  new install on a laptop with an 
> SSD replacing the dynamic hard drive. I am wondering what the best 
> practice is on the swap space.
> I have heard that the SSD has a limited, if large, number of re-writes 
> in its lifetime. Like a usb thumbdrive it can wear out. So, if a 
> computer is heavily used would it make sense to add 'noswap' to the 
> Grub default file? This would eliminate the many re-writes to swap and 
> preserve the SSD for a longer life. Is this reasonable?
> Thank you, Ted P.
> _______________________________________________
> nmglug mailing list
> nmglug at lists.nmglug.org
> http://lists.nmglug.org/listinfo.cgi/nmglug-nmglug.or

More information about the nmglug mailing list