On 5 March 2015 at 10:59, Laurie Brown laurie@brownowl.com wrote:
It's possible to control "swappiness" on Linux. This is certainly true for Gentoo and Ubuntu, and probably for all distros. The default setting is 60 out of 100 which is much too high for normal desktop use but ok for servers. For SSD's, it's silly.
I have played with this in the past but not really been able to see a difference. I can't say I've done any serious analysis though.
I know SSDs are fast, but they also have a limited life for writes. In my opinion, therefore, they are unsuitable for transient data such as logs, swap files, and so on.
Everything I've read recently suggests that modern SSDs have sufficient life in them to outlive their usefulness before they wear out even in fairly heavy usage. SSDs get a bad rep here but it's not as if hard disks don't wear out too! As SSDs are solid state there's more potential for them to live forever if it weren't for the limited writes, but I wouldn't bank on a heavily used hard disk being any use mechanically in 10 years time even if technically the platters are still perfectly capable of being written to.
That said, any guides (such as the one you linked to) for maximising their life is appreciated. Also, it would be useful to know what the symptoms of this type of failure would be? Would the controller pick up errors or would it blindly write data unaware it couldn't get it back? Unlike a hard disk, I would have thought that when it starts to fail in this way your existing data is still pretty safe (unlike when a hard disk fails, for example)?
I did make a decision when I decided to go down this route that I wouldn't give the SSD "special treatment" by trying to keep certain data off it. If it fails in a couple of years that's a lesson learned (and learning lessons is part of the reason for doing this). If it fails before that I'll make use of the warranty!
As an aside, I have some virtual servers with Digital Ocean who use SSDs across the board and provide documentation for enabling swap files on the SSD. I am sure they're using higher grade SSDs that I have ordered but all the same that indicates that they don't see limited writes as a major issue any more.
I am very much a novice with SSD though so I really appreciate corrections.