In a couple of days, I'm going to buy a new notebook (Asus N551, should it matter), tending to replace the HDD with a Samsung EVO 500GB SSD. Now, I've often read that one should make sure that Ubuntu uses swap as little as possible, especially avoiding hibernation, to extend SSD life. Is this still relevant these days? I project I won't use this notebook for longer than ~5 years.

up vote 5 down vote accepted

Depending on how much RAM your system has, you can get away with using very little swap, and even then, your computer will only use swap when it runs out of space in RAM. Obviously, writing to the SSD will shorten its lifespan, but as long as you avoid using utilities that make many small writes (like defragmentation) you should be fine.

Hibernate works by moving all of the data off of the RAM into swap so that the system can quickly resume when you power back on (you need at least as much swap as RAM). In principle, this will degrade SSD lifespan, but definitely not as much as defragging.

Quantifying how much shorter the lifespan of a SSD is when relying on swap is non-trivial, but I recall reading an article about SSD failure that attempted to see how long a SSD could last under worst case scenarios--the result was that the SSDs lasted longer than expected and failed only after giving good notice.

I'm relatively confident that having a swap partition size slightly larger than your RAM size is not going to significantly shorten your drive's lifespan unless you are actively trying to cause it to fail--I haven't had a drive fail from usage yet. The stigma against SSD lifespan grew largely in their earlier years, and SSDs have improved significantly since then. Make sure that you do some research on the brand, and compare the different NAND technologies to find the one that will best fit your needs; there is a definite difference between the technologies in terms of lifespan and speed that is weighed against cost.

TL;DR If you research your SSD and pick a good one, under reasonable use, having a swap partition should not noticeably shorten your SSDs lifespan.

Concerns about swap on SSDs are unfounded. They can handle a good 10,000 writes, so to wear out a 500 GB SSD you would have to write 100 MB / second to it every second for for 578 days. There is no way you are going to manage to keep it constantly swapping that much for that long, and certainly writing 1-2 gb for hibernation once or twice a day is not going to come close.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.