Ubuntu Timeshift and SSD Wear - Page 1
Forum section: electronics / general

author: German_EE
author_rank: Super Contributor
timestamp: November 02, 2019, 07:12:49 pm
content: Anyone out there who has an SSD in your system and you're running either Ubuntu Linux or Linux Mint please read this.A program called 'Timeshift' is enabled by default and when in use it takes automatic backups of your hard drive. Normally backups are a good thing but in this case a) the backups are stored on the same drive making them useless and b) the drive wear when using this program is terrifying, it can kill an SSD in six months if daily snapshots are enabled.So, please think carefully if you still want to use this program. If you don't want to use it then going to Update Manager / Edit / System Snapshots /Settings /Schedule will let you turn off all backup requests, If you do want to use Timeshift then make sure you backup to spinning rust rather than an SSD.

author: wraper
author_rank: Unknown
timestamp: November 02, 2019, 07:17:58 pm
content: Quote from: German_EE on November 02, 2019, 07:12:49 pmBS, you need to rewrite a whole size of SSD hundreds of times to even closely come to possibility of failuredue to wear.

author: Monkeh
author_rank: Super Contributor
timestamp: November 02, 2019, 07:22:23 pm
content: Not only is it not useless (oops, accidentally made a modification you didn't want or deleted a file? restore it!), but to claim it can wear out an SSD is nonsense.Timeshift uses either hardlinks or filesystem-level snapshots - in both cases effectively no data (only a bit of metadata) is written unless a file is changed after the snapshot.

author: German_EE
author_rank: Super Contributor
timestamp: November 03, 2019, 08:40:54 am
content: The system I repaired last night had 220 Gb of files in the Timeshift directory, this was on a 250 Gb Samsung drive that had died after six months and was now read only. Analysis of the SMART data showed that about 20 Gb a day was written to the drive and about the same amount was deleted.

author: wraper
author_rank: Unknown
timestamp: November 03, 2019, 10:02:47 am
content: Quote from: German_EE on November 03, 2019, 08:40:54 am20GB/day for 250GB drive means it should be good for at least 10 years.

author: Electro Detective
author_rank: Super Contributor
timestamp: November 03, 2019, 10:09:41 am
content: Thanks for the heads up on that, German_EEObviously users need to tune their settings right, so Timeshift points don't accumulate out of hand on the local driveor better still, send the restore points to another drive and keep an eye on thati.e. if the local drive dies, you've got nothing,no matter what the MTBF rating apparently WAS on the deceased drive

author: Twoflower
author_rank: Frequent Contributor
timestamp: November 03, 2019, 10:22:43 am
content: Are you sure you actually got the right file-size on the Timeshift directory? Keep in mind Timeshift uses links and only stores changed files. So it make a normal ls -asl look like there is a full copy of your system. I wouldn't wonder if you will have more than 250GB worth of files on your 250GB SSD. But in reality it might be much less.Samsung specifies 75TBW within 5 years for the EVO 850 (as example). Assuming the 20GByte per day your drive would be good for quite some time: 3750 days.Get in contact with Samsung and get a replacement of that SSD as it is clearly defective within warranty.

author: Siwastaja
author_rank: Super Contributor
timestamp: November 03, 2019, 10:50:58 am
content: Backing up on the same drive is not useless.I would dare to say, the #1 reason for restoring backups is any user "oops". Physical drive damage is far behind. Of course,properback-ups aim to solve both. Worst "backup" scheme is the one which ignores #1 and only aims to protect against drive damage.You accidentally deleted an important file or directory.You messed up with manual "versioning" and saved over something you didn't mean to.A piece-of-shit buggy EDA tool crashed, wrote shit over the data.Anything like this.Then, the most important criteria for backing up is to do it often enough, but also keep old enough backups, because sometimes the oops is not imminent right away.It's easy to recreate one or two days of work. Maybe backing up once a week, and keeping 4-5 latest backups, is a good enough compromise.

author: Monkeh
author_rank: Super Contributor
timestamp: November 03, 2019, 03:17:35 pm
content: Quote from: German_EE on November 03, 2019, 08:40:54 amWhich is not to say that it's using that much space on the filesystem.. again, hardlinks and snapshots. Not to mention SSDs perform de-duplication internally.QuoteWhich is not too horrendous. Actually, 20Gb would be puny - perhaps you meant GiB..

author: Twoflower
author_rank: Frequent Contributor
timestamp: November 03, 2019, 09:43:33 pm
content: Quote from: Monkeh on November 03, 2019, 03:17:35 pmThat's new to me. Do you have any information about that? Actually I would wonder if that's the case as if the FS does that (e.g. ZFS) it's reasonable high resource-demanding.

author: Mr. Scram
author_rank: Super Contributor
timestamp: November 03, 2019, 09:54:18 pm
content: What specific model is this SSD?

author: wraper
author_rank: Unknown
timestamp: November 03, 2019, 10:06:26 pm
content: AFAIK only Sandforce (long gone) controllers did data compression.

author: Halcyon
author_rank: Unknown
timestamp: November 04, 2019, 12:11:41 am
content: Quote from: German_EE on November 03, 2019, 08:40:54 amSounds like a case of premature failure which is covered by warranty. I have Intel SSDs which have been in constant service for 5+ years with no issues.

author: nctnico
author_rank: Super Contributor
timestamp: November 04, 2019, 12:20:53 am
content: Quote from: Halcyon on November 04, 2019, 12:11:41 amYou have to be careful with this kind of anecdotal evidence. SSDs which are powered on 24/7 can use the wear levelling / error detection to prevent data loss. This is a continuous process which runs in the background for as long as the SSD is on. So an SSD may seem fine but it may lose it's contents within a couple of weeks when powered down due to wear on the flash cells. An SSD is a completely different beast compared to a hard drive. For this reason I always make backups on hard drives.

author: Halcyon
author_rank: Unknown
timestamp: November 08, 2019, 10:47:51 pm
content: Quote from: nctnico on November 04, 2019, 12:20:53 amIt's not exactly "anecdotal" evidence. SSDsaremore resilient than spinning hard disks provided you use them "normally" and the disk is working correctly. What the OP described is not normal and indicates a fault with the disk. I even use normal consumer SSDs in servers without any issues. Wear leveling doesn't just continually shuffle data around (that would defeat the entire purpose of it), it only applies when data is written to the disk to ensure each cell gets used evenly and makes use of the spare area when a cell exceeds its rated write/erase cycle. Theoretically, if you write data to a cell but don't erase/rewrite it, it would last forever (provided you keep the disk periodically powered up). Reading data from SSDs doesn't contribute to wear, writing does, but even then, that cell would need to be written to thousands and thousands of times.If you used an SSD in a very write intensive system, yes, I would expect it to wear out. But if you're using it in a system that does more reading than writing, it should last many, many years (if not, more than your lifetime). You can even use SSD drives in NAS/SAN devices for this reason.I'm currently using 8+ year old Hitachi 2TB spinning disks in my NAS and they are approaching the end of their life. While one has developed a bad sector, my main concern is that one day I'll power down the machine (for maintenance etc...) and one or more of the disks simply won't spin up anymore.

author: nctnico
author_rank: Super Contributor
timestamp: November 09, 2019, 12:07:29 am
content: Quote from: Halcyon on November 08, 2019, 10:47:51 pmNo. The ultra high density nand flash cells leak and using multi-levels makes things worse. In other words: you'll need to refresh a nand flash cell every now and then. More wear means having less time between refresh cycles because the amount of leakage increases. There is a good reason nand flashes come with a lot of extra error correction bits and the controllers use sophisticated error detection and correction algorithms.In my experience a hard drive is very reliable for as long as you keep it cooled properly (which isn't a given in most standard cases) while it is powered. Getting 10+ years 24/7 out of a hard drive is not uncommon for me.

author: Halcyon
author_rank: Unknown
timestamp: November 09, 2019, 06:00:49 am
content: Quote from: nctnico on November 09, 2019, 12:07:29 am10 years is about approaching the maximum "comfortable" limit of mechanical hard disks, particularly in a corporate environment. In my experience, most drives are quite happy at operating at elevated temperatures and don't really impact on their overall lifespan. What you want to avoid with hard disks are wide temperature variations and constant power up/down cycles, those will cause failure far sooner. Of course, that being said, this is my "corporate systems admin" side speaking. In a home environment, yes absolutely drives will last much longer, but your reliability may vary. I have hard disks sitting on my shelf that are over 30 years old and still work just fine, would I rely on them for important tasks? Absolutely not.There are a bunch of papers written by companies like Google and various data centres around the world which talk about hard disk failure trends. It's quite interesting reading.

author: Mr. Scram
author_rank: Super Contributor
timestamp: November 09, 2019, 09:27:49 pm
content: Quote from: Halcyon on November 08, 2019, 10:47:51 pmAt least some drives do shuffle data around. Samsung 840 drives had an issue with data retention and the fix is firmware gaat shuffles data around. More drives likely use the same trick. Write amplification also leads to effective data shuffling.