Author Topic: Ubuntu Timeshift and SSD Wear  (Read 466 times)

0 Members and 1 Guest are viewing this topic.

Offline German_EE

  • Super Contributor
  • ***
  • Posts: 2270
  • Country: de
Ubuntu Timeshift and SSD Wear
« on: November 02, 2019, 07:12:49 pm »
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.
Should you find yourself in a chronically leaking boat, energy devoted to changing vessels is likely to be more productive than energy devoted to patching leaks.

Warren Buffett
 

Offline wraper

  • Supporter
  • ****
  • Posts: 10327
  • Country: lv
Re: Ubuntu Timeshift and SSD Wear
« Reply #1 on: November 02, 2019, 07:17:58 pm »
b) the drive wear when using this program is terrifying, it can kill an SSD in six months if daily snapshots are enabled.
BS, you need to rewrite a whole size of SSD hundreds of times to even closely come to possibility of failure due to wear.
 

Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 6002
  • Country: gb
Re: Ubuntu Timeshift and SSD Wear
« Reply #2 on: November 02, 2019, 07:22:23 pm »
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.
 

Offline German_EE

  • Super Contributor
  • ***
  • Posts: 2270
  • Country: de
Re: Ubuntu Timeshift and SSD Wear
« Reply #3 on: November 03, 2019, 08:40:54 am »
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.
Should you find yourself in a chronically leaking boat, energy devoted to changing vessels is likely to be more productive than energy devoted to patching leaks.

Warren Buffett
 

Offline wraper

  • Supporter
  • ****
  • Posts: 10327
  • Country: lv
Re: Ubuntu Timeshift and SSD Wear
« Reply #4 on: November 03, 2019, 10:02:47 am »
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.
20GB/day for 250GB drive means it should be good for at least 10 years.
 
The following users thanked this post: Mr. Scram

Offline Electro Detective

  • Super Contributor
  • ***
  • Posts: 2151
  • Country: au
Re: Ubuntu Timeshift and SSD Wear
« Reply #5 on: November 03, 2019, 10:09:41 am »

Thanks for the heads up on that, German_EE  :-+ 

Obviously users need to tune their settings right, so Timeshift points don't accumulate out of hand on the local drive

or better still, send the restore points to another drive and keep an eye on that

i.e. if the local drive dies, you've got nothing,
no matter what the MTBF rating apparently WAS on the deceased drive  :scared:
 

Online Twoflower

  • Frequent Contributor
  • **
  • Posts: 490
  • Country: de
Re: Ubuntu Timeshift and SSD Wear
« Reply #6 on: November 03, 2019, 10:22:43 am »
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.
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 2057
  • Country: fi
Re: Ubuntu Timeshift and SSD Wear
« Reply #7 on: November 03, 2019, 10:50:58 am »
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, proper back-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.


 

Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 6002
  • Country: gb
Re: Ubuntu Timeshift and SSD Wear
« Reply #8 on: November 03, 2019, 03:17:35 pm »
The system I repaired last night had 220 Gb of files in the Timeshift directory

Which 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.

Quote
Analysis of the SMART data showed that about 20 Gb a day was written to the drive and about the same amount was deleted.

Which is not too horrendous. Actually, 20Gb would be puny - perhaps you meant GiB..
 

Online Twoflower

  • Frequent Contributor
  • **
  • Posts: 490
  • Country: de
Re: Ubuntu Timeshift and SSD Wear
« Reply #9 on: November 03, 2019, 09:43:33 pm »
[...]Not to mention SSDs perform de-duplication internally[...]
That'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.
 

Offline Mr. Scram

  • Super Contributor
  • ***
  • Posts: 8042
  • Country: 00
  • Display aficionado
Re: Ubuntu Timeshift and SSD Wear
« Reply #10 on: November 03, 2019, 09:54:18 pm »
What specific model is this SSD?
 

Offline wraper

  • Supporter
  • ****
  • Posts: 10327
  • Country: lv
Re: Ubuntu Timeshift and SSD Wear
« Reply #11 on: November 03, 2019, 10:06:26 pm »
AFAIK only Sandforce (long gone) controllers did data compression.
 

Online Halcyon

  • Moderator
  • *****
  • Posts: 3670
  • Country: au
Re: Ubuntu Timeshift and SSD Wear
« Reply #12 on: November 04, 2019, 12:11:41 am »
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.

Sounds 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.
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 17860
  • Country: nl
    • NCT Developments
Re: Ubuntu Timeshift and SSD Wear
« Reply #13 on: November 04, 2019, 12:20:53 am »
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.
Sounds 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.
You 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.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online Halcyon

  • Moderator
  • *****
  • Posts: 3670
  • Country: au
Re: Ubuntu Timeshift and SSD Wear
« Reply #14 on: November 08, 2019, 10:47:51 pm »
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.
Sounds 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.
You 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.

It's not exactly "anecdotal" evidence. SSDs are more 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.
« Last Edit: November 08, 2019, 11:06:32 pm by Halcyon »
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 17860
  • Country: nl
    • NCT Developments
Re: Ubuntu Timeshift and SSD Wear
« Reply #15 on: November 09, 2019, 12:07:29 am »
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.
Sounds 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.
You 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.

It's not exactly "anecdotal" evidence. SSDs are more 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).
No. 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.
« Last Edit: November 09, 2019, 12:10:59 am by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online Halcyon

  • Moderator
  • *****
  • Posts: 3670
  • Country: au
Re: Ubuntu Timeshift and SSD Wear
« Reply #16 on: November 09, 2019, 06:00:49 am »
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.

10 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.
 

Offline Mr. Scram

  • Super Contributor
  • ***
  • Posts: 8042
  • Country: 00
  • Display aficionado
Re: Ubuntu Timeshift and SSD Wear
« Reply #17 on: November 09, 2019, 09:27:49 pm »

It's not exactly "anecdotal" evidence. SSDs are more 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.
At 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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf