[GTALUG] Swap and Hibernate on SSDs

Russell rreiter91 at gmail.com
Sat Jan 27 10:09:33 EST 2018



On January 27, 2018 8:49:15 AM EST, Giles Orr via talk <talk at gtalug.org> wrote:
>In the early days of SSDs, there was a lot of talk in the Linux
>community
>that you shouldn't have a swap partition on an SSD.  An indirect side
>effect of that is that it becomes impossible to suspend-to-disk (aka
>"hibernate") on a SSD-only system.  Although I suppose that you could
>have
>the swap partition and set swappiness to 0.  So I have a new SSD
>system,
>and was wondering the current state of these things:

I'm still tweaking/breaking (in) my new SSD desktop system myself. I took Hugh's advice and did some research on TRIM.

This link has lots of info.

https://wiki.debian.org/SSDOptimization

My  observations so far.
>
>- is it considered okay to have a swap partition on an SSD drive?

Yes, it's getting to be an inevitability. The key is to optimize the system to minimize the number of writes. ie. config w/ noatime to reduce writing all of the files access times to the drive. Some questions around that tho. Later kernels use relatime as a  default middle ground.
Kernels 4+ have lazyatime available.
https://lwn.net/Articles/621046/

>- how should I set the swappiness?

That all depends on the   operational stress factors. I think that on an average desktop, the default is fine.

https://lwn.net/Articles/83588/

>- is it considered okay to hibernate to an SSD?

Just from what I've read so far, if you keep to the convention of 2x(ram) for the swap you shouldn't have any problems.

>
Again, from what I've read recently,  the general feeling is that an enterprise SSD, capable of >50gb writes in a day, is as virtually stable as a standard HDD. Consumer SSD's are considered the same if writes =<20gb a day.

HTH
>-- 
>Giles
>https://www.gilesorr.com/
>gilesorr at gmail.com

-- 
Russell


More information about the talk mailing list