https://eclecticlight.co/2022/12/05/how-to-estimate-an-ssds-working-life/ Skip to content [eclecticlight] The Eclectic Light Company Macs, painting, and more Main navigation Menu * Downloads * M1 & M2 Macs * Mac Problems * Mac articles * Art * Macs * Painting hoakley December 5, 2022 Macs, Technology How to estimate an SSD's working life Hard disks are electro-mechanical devices that wear out. Predicting their working life is something of a black art, and most influenced by the wear and tear they sustain, particularly when they're spun up, and even their specific manufacturing batch. Solid-state drives (SSDs) should be more predictable. Although like any solid-state electronics they can suddenly and unexpectedly die, for example if they sustain damage from spikes in power supply, the most likely cause of death of most SSDs should be when they can no longer be written to successfully any more. That occurs because there's a limit to the number of times that each block of memory in the SSD can be erased and written to again in the program/erase cycle. Once that limit has been reached, it ceases storing data. Wear levelling To ensure that all the memory in an SSD ages at a consistent rate, they incorporate wear-levelling mechanisms. If those don't function correctly, you could find some blocks of memory reaching the end of their working life while others have been barely used. We put a lot of trust into this internal wear-levelling. Wear-levelling doesn't come without cost. A lot of data stored doesn't change from one month to the next. In order to ensure that all memory within an SSD has a similar level of wear, the mechanism also has to move around that more static data, which itself adds to the program/erase cycles, and increases wear. This should be most noticeable on SSDs with relatively little free space, and high write rates. When writing changed blocks of data, unlike some older file systems, APFS doesn't try to write the changed data to the same blocks, but uses copy-on-write to write new blocks each time. That helps wear-levelling, but can't replace it. Wear levelling is most efficient on SSDs with ample free space, using APFS. TBW There are several different ways that the working life of an SSD can be expressed, of which the most widely used is TBW, the Total Bytes Written. Manufacturers may claim or even warranty that a given SSD has a TBW of 600 TB, for example. Taken alone, this may not appear to make sense, but examined across a range of capacities, it becomes obvious that TBW increases with increasing capacity. This is because it effectively describes how many program/erase cycles that SSD should achieve before failing. Typical values for good SSDs are around 150 TB for a capacity of 250 GB, 300 TB for 500 GB, 600 TB for 1 TB, and so on. In other words, those SSDs should be good for about 600 program/erase cycles, which may not appear many until you translate that into life span in years. The larger the capacity of an SSD, the more data can be written to it during its working life. Lifetime If you know the TBW for an SSD and the total amount of data that has been written to it during its lifetime, it's simple to estimate the percentage of its lifetime (as TBW) that has been used up, hence the amount remaining. If my 1 TB SSD has so far written 100 TB to it, and has a TBW of 600 TB, then it has used 16.7% (one sixth) of its total life, and has 83.3% remaining. There are only two problems here: obtaining a TBW value, and measuring the total amount of data written to the SSD. Apple doesn't provide TBW values for any of its internal SSDs. Not only that, but those widely used for third-party SSDs may not be reliable. Like everything else, TBW isn't a fixed value, and different SSDs of the same model will differ in their TBW, as will different manufacturing batches. In many cases, TBW are used to determine the length of warranty, for which they will err on the safe side. You may thus find that a manufacturer sets their TBW so that they expect less than 5% of their drives to fail before reaching the TBW, to minimise the number of warranty claims they receive. The average or median TBW could thus be significantly higher. I've seen it suggested that the 'real' TBW of modern Apple internal SSDs is anything from 600-1200 TB for a 1 TB drive. That's a wide range of uncertainty. Obtaining an accurate measurement of the total data written to an SSD appears simple, using S.M.A.R.T. health indicators and an app such as DriveDx, SMARTReporter or smartmontools. There are two different indicators that can be used for this: * for NVMe devices, including all recent Apple internal SSDs, this should be 007 Data Units Written, given as the number of 512-byte units; * for ATA devices, including many external SSDs, it's likely to be 241 and 243 Total LBAs Written, where an LBA is likely to be 512 bytes. Unfortunately, you also come across anomalous results where manufacturers appear to be using different units for reporting. It's also unclear whether this total includes other overhead, such as that incurred by wear-levelling. If you prefer, rather than using TBW, you can calculate the total data written per terabyte of storage capacity, which makes it easier to compare between drives of different size. That figure is effectively the number of program/erase cycles each block of memory will complete successfully before failure. If a 500 GB drive has a TBW of 300 TB, then the number of cycles before failure is 600. Examples Although higher TBW is generally to be preferred, for some applications low TBWs are perfectly acceptable. In more than a year of making Time Machine backups to APFS, my 2 TB external SSD has 1 TB of backups but has only written 5 TB of data. If that SSD had a low TBW of 100 TB (i.e. it could only write 50 cycles) it should still last a total of 20 years. Backup disks shouldn't require a high TBW Main system storage tends to require higher TBWs. In four years of use as the only bootable system disk, the 1 TB internal SSD of my iMac Pro, with an expected TBW of at least 600 TB, has written nearly 120 TB, or 30 TB per year. To attain the expected ten-year life, the lowest that drive could be is 300 TB (300 cycles), and a TBW of anything less than 150 TB would limit its life to five years or less. System disks need a high TBW The combination of low drive capacity and excessive swap use is also easy to illustrate. For a 500 GB internal SSD with a TBW of 300 (equating to a good life of 600 cycles), exceeding 30 TB written per year would shorten that drive's life below the notional ten years. Adding only 10 GB of swap writing each day would shorten that drive's life by over a year. High swap use and low drive capacity can result in shortened life Key points * Wear levelling is most efficient on SSDs with ample free space, using APFS. * The larger the capacity of an SSD, the more data can be written to it during its working life. * Backup disks shouldn't require a high TBW * System disks need a high TBW * High swap use and low drive capacity can result in shortened life Share this: * Twitter * Facebook * Reddit * Pinterest * Email * Print * Like this: Like Loading... Related Posted in Macs, Technology and tagged APFS, capacity, DriveDx, S.M.A.R.T., smartmontools, SMARTReporter, SSD, TBW, wear levelling. Bookmark the permalink. 20Comments Add yours 1. 1 [820b07f0d034] Albert Godfrind on December 5, 2022 at 7:57 am Reply Very interesting. Thanks for sharing your research. LikeLiked by 1 person + 2 [6986a746f627] hoakley on December 5, 2022 at 8:46 am Reply Thank you. Howard. LikeLike 2. 3 [62a911a048ef] Adam Klobukowski on December 5, 2022 at 8:57 am Reply There is aditional problem. NAND media are not perfect and they loose data over time. Because of that, SSD drive (if powered on) will refresh (by reading then writing) its data from time to time. If it is not powered, it will loose data after some years (how long depends on the specific NAND media). So, you should not keep your SSDs not powered for extended time. If kept powered at all time, I estmate that SSD will wear itself out after about 10 years. LikeLiked by 1 person + 4 [6986a746f627] hoakley on December 5, 2022 at 9:27 am Reply Thank you. There are two separate issues here. First, the longevity of SSDs in storage, which isn't within the scope of this article. It's generally agreed that SSDs will lose data when left unpowered for prolonged periods, although I have yet to see good info on how long. Most recommend powering up SSDs that are being stored every year or so. The best recommendation, though, is not to use SSDs for archival purposes, as they're not suitable. Second, the finite life of SSDs that are in regular and fairly frequent use. This is much harder to know, as there's no way to accelerate its assessment in the lab. Most seem to agree that, when in regular or constant use, modern SSDs should be good for ten years. Of course, no modern media have reached that age, so it's still a prediction rather than a measurement. Given that hard disks in regular use almost never last that long, and that other electronic components on logic boards may well die before ten years, I think a ten year notional life (as I refer to above) is probably as good as most users would expect. It will be a few years yet before we know whether that's actually more like eight, fifteen or even twenty years for modern products. Howard. LikeLike o 5 [6d83ecc8d97f] kapitainsky on December 5, 2022 at 5:15 pm Reply Indeed longevity of SSDs are hard to find and not published by most manufacturers. I was investigating it myself and found only information about SLC SSDs: https://www.ni.com/en-gb/support/documentation/ supplemental/18/ effects-of-temperature-on-ssd-endurance.html I would not draw conclusion from this to store my SSD in the fridge:) but clearly SSD disks do not like hot places. How to extrapolate these numbers to TLC or QLC drives I am not sure. For my personal use I assume that QLC SSD I use for TM backups should not be left out of power for longer than 1 year. On top of this I do automated full disk read every month (dd if=/dev/disk of=/dev/null). It is the simplest way to help SSD logic to notice any deteriorating cells. Most SSDs use sophisticated ECC data encodings (LDPC with hard and soft error correction algorithms) and in case when data is getting corrupted (but still correctable) cells are rewritten - but it requires data to be read. LikeLiked by 1 person # 6 [6986a746f627] hoakley on December 5, 2022 at 5:18 pm Thank you. For the internal and boot disk of a Mac, I don't think these should be issues, unless you go on a very long holiday indeed! Howard. LikeLiked by 1 person 3. 7 [60039afefb65] Iljitsch van Beijnum on December 5, 2022 at 9:39 am Reply So how do you know if your SSD is reaching the end of its life? At some point an operation will fail: read, write, erase. Read errors will be obvious. Or perhaps the failure mode is that you can retry a few times and still get the correct result most of the time? Does the SSD controller notice when an erase or write wasn't executed properly? If so, it can hide the problem by marking a certain region of the chip bad and remapping it to the pool of spare data. But do we get to see statistics for any of these non-fatal errors? I always thought "S.M.A.R.T." was supposed to do that but I've never seen a SMART status other than the meaningless "verified". Typing this on a 9-year old MBP with 8 GB RAM and a ""256''", well "251" but really 233.76 GB SSD. (Why doesn't Apple claim 8.59 "GB" RAM?) Anyway, after almost a decade with limited RAM and a modest SSD I'm sure there must be at least a few early signs of degradation. LikeLiked by 1 person + 8 [6986a746f627] hoakley on December 5, 2022 at 9:48 am Reply This is where you need one of the SMART tools I have mentioned above: to look at the status/health indicators, and estimates of the total data written to the drive. Disk Utility's bland answer really isn't helpful in this. Typically, as an SSD reaches the end of its life, you should see increasing numbers of bad blocks being marked out, and wear indicators heading towards the 'worn out' value. My choice is DriveDx, which incorporates a lot of private information that aids interpretation, and an excellent interface. But you don't need to pay for an app, and smartmontools remains at the heart of most of them, including, I believe, DriveDx. Howard. LikeLike o 9 [60039afefb65] Iljitsch van Beijnum on December 5, 2022 at 10:28 am Reply Ah yes, thanks. I installed smartmontools and got the exact opposite from the sparse Disk Utility SMART status: several screens full of info. This seems to be the most relevant: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 173 Wear_Leveling_Count 0x0032 176 176 100 Old_age Always - 1851178811944 175 Host_Writes_MiB 0x0022 099 099 000 Old_age Always - 45191799 Not sure what the raw values mean, but unless I'm mistaken the "value" counts down and you should be good until you reach the "thresh". The wear leveling value should start at 200. So if that's right, I've used up 24% of the wear leveling capacity of the drive. I guess the "host writes" value is a percentage of how much of the design write number is left. If that is correct I've only used 1%, which seems unlikely. Or does this also start at 200? Then I've used 50%. iostat -Id disk0 tells me I write about 40 GB/day so about the full capacity of the SSD every week. After close to 500 weeks I'm starting to to get close to that 600 x number... Although it must be less in practice because I don't use this computer every day. (BTW, 40 GB/day is quite ridiculous. That's at least a megabyte per second whenever the machine is awake. I'm guessing a lot of this is Apple's logging firehose that serves no purpose on 99.99% of all Macs.) LikeLiked by 1 person # 10 [6986a746f627] hoakley on December 5, 2022 at 11:50 am This is one of the problems with smartmontools: interpreting the results. While indicator 173 does still look good, I have no idea what that should start at for your SSD. And indicator 175 isn't normally given as Host Writes, so I don't know what that means at all. iostat only reports what the kernel and system write to the disk, which may not be the same as the disk actually writes, which you'd expect to be rather larger. Finally, you'll be surprised to learn that the Unified log isn't a firehose at all: even on very active systems, it's unlikely to account for more than 1 GB in a whole 24 hours of uptime without sleep. That's because the data is written in compressed binary format rather than text. Howard. LikeLike 4. 11 [e52fa4e7184e] eyelessjerry on December 5, 2022 at 9:43 am Reply Thanks for more information on this! Just wanted to note that TinkerTool System has some relevant information shown in Diagnostics->Flash Health, but not sure how accurate the Estimated consumed lifetime measure (and other measures) is. I have seen two SSDs so far no longer working - one I managed to save the data from (a Samsung 840 Evo disk I had installed in an old iMac), while the first was an Apple SSD in a MacBook Air and there I could not read anything meaningful. LikeLiked by 1 person + 12 [6986a746f627] hoakley on December 5, 2022 at 9:48 am Reply Thank you. Howard. LikeLiked by 1 person 5. 13 [d1800e30253a] Christian on December 5, 2022 at 11:27 am Reply Hi Howard! very interesting as always. Maybe a stupid question: I guess the SSD's wear levelling doesn't care about how the SSD is partitioned? i.e. say I have a 100 GB APFS container on a drive and the rest unused, is the wear levelling still happening on the whole "surface" of the SSD or just on that allocated 100 GB space? LikeLiked by 1 person + 14 [6986a746f627] hoakley on December 5, 2022 at 11:51 am Reply Thank you. As far as the SSD is concerned, wear-levelling should occur over the whole disk, regardless of what's allocated in partitions. So I think it should be levelling across the full capacity of that SSD. Howard. LikeLike 6. 15 [070d89fa6e75] Tim R on December 5, 2022 at 12:57 pm Reply "The larger the capacity of an SSD, the more data can be written to it during its working life." This is true of course. But in shopping for SSDs I've found a very nonintuitive semi-related outcome regarding TBW numbers. That is, at the same capacity, the more expensive the SSD within a particular manufacturer's line, the lower the TBW. I assume this is from heat generated in search of higher performance, but once I started looking at TBW, I have tended to buy the less expensive drives. Just thought that was an interesting observation for the greater TBW discussion. LikeLiked by 1 person + 16 [6986a746f627] hoakley on December 5, 2022 at 1:24 pm Reply Thank you. I think price/TB is a confounder rather than a direct association. One factor that I haven't mentioned here is the use of SLC write cache. While not normal on slow SATA SSDs, for example, it's essential for the high performance expected with NVMe. Although I haven't seen it discussed with respect to TBW, I'd expect the repeated use of large amounts of SLC write cache to increase the number of P/E cycles. So, while a SATA SSD should write only one block for each block of data written to it, when an NVMe SSD is at full pelt, each block of data written could cost more than two blocks, maybe 3 or 4, after caching. I don't think that heat or temperature comes into it, as TBW testing should be performed at optimal temperatures throughout. But it will, of course, affect the TBW the user experiences. Looking at some ranges, such as Samsung, the relationship between TBW and price isn't simple, and many cheaper SSDs do have lower TBW than their more expensive siblings. The other factor, of course, is the intended market. Enterprise SSDs tend to offer the highest TBW, and are invariably more expensive that consumer models. Howard. LikeLike o 17 [070d89fa6e75] Tim R on December 5, 2022 at 1:29 pm Reply Also true. I would say the simple takeaway is that one should never assume more expensive = higher TBW. It's often difficult to find some TBW numbers as they're not yet the focus of marketing, but it's worth the effort. LikeLiked by 1 person # 18 [6986a746f627] hoakley on December 5, 2022 at 4:04 pm If only Apple Marketing could be convinced that they should release them for its internal SSDs. Howard. LikeLike 7. 19 [23cacb2a2017] brookter on December 5, 2022 at 6:34 pm Reply A really helpful article, Howard - thanks very much! LikeLiked by 1 person + 20 [6986a746f627] hoakley on December 5, 2022 at 9:18 pm Reply Thank you. Howard. LikeLike Leave a Reply Cancel reply Enter your comment here... [ ] Fill in your details below or click an icon to log in: * * * * Gravatar Email (required) (Address never made public) [ ] Name (required) [ ] Website [ ] WordPress.com Logo You are commenting using your WordPress.com account. ( Log Out / Change ) Twitter picture You are commenting using your Twitter account. ( Log Out / Change ) Facebook photo You are commenting using your Facebook account. ( Log Out / Change ) Cancel Connecting to %s [ ] Notify me of new comments via email. [ ] Notify me of new posts via email. [Post Comment] [ ] [ ] [ ] [ ] [ ] [ ] [ ] D[ ] This site uses Akismet to reduce spam. Learn how your comment data is processed. Quick Links * Downloads * Mac Troubleshooting Summary * M1 & M2 Macs * Mac problem-solving * Painting topics * Painting * Long Reads Search Search for: [ ] [Search] Monthly archives * December 2022 (12) * November 2022 (72) * October 2022 (76) * September 2022 (72) * August 2022 (75) * July 2022 (76) * June 2022 (73) * May 2022 (76) * April 2022 (71) * March 2022 (77) * February 2022 (68) * January 2022 (77) * December 2021 (75) * November 2021 (72) * October 2021 (75) * September 2021 (76) * August 2021 (75) * July 2021 (75) * June 2021 (71) * May 2021 (80) * April 2021 (79) * March 2021 (77) * February 2021 (75) * January 2021 (75) * December 2020 (77) * November 2020 (84) * October 2020 (81) * September 2020 (79) * August 2020 (103) * July 2020 (81) * June 2020 (78) * May 2020 (78) * April 2020 (81) * March 2020 (86) * February 2020 (77) * January 2020 (86) * December 2019 (82) * November 2019 (74) * October 2019 (89) * September 2019 (80) * August 2019 (91) * July 2019 (95) * June 2019 (88) * May 2019 (91) * April 2019 (79) * March 2019 (78) * February 2019 (71) * January 2019 (69) * December 2018 (79) * November 2018 (71) * October 2018 (78) * September 2018 (76) * August 2018 (78) * July 2018 (76) * June 2018 (77) * May 2018 (71) * April 2018 (67) * March 2018 (73) * February 2018 (67) * January 2018 (83) * December 2017 (94) * November 2017 (73) * October 2017 (86) * September 2017 (92) * August 2017 (69) * July 2017 (81) * June 2017 (76) * May 2017 (90) * April 2017 (76) * March 2017 (79) * February 2017 (65) * January 2017 (76) * December 2016 (75) * November 2016 (68) * October 2016 (76) * September 2016 (78) * August 2016 (70) * July 2016 (74) * June 2016 (66) * May 2016 (71) * April 2016 (67) * March 2016 (71) * February 2016 (68) * January 2016 (90) * December 2015 (96) * November 2015 (103) * October 2015 (119) * September 2015 (115) * August 2015 (117) * July 2015 (117) * June 2015 (105) * May 2015 (111) * April 2015 (119) * March 2015 (69) * February 2015 (54) * January 2015 (39) Tags APFS Apple AppleScript Apple silicon backup Big Sur Blake bug Catalina Consolation Console diagnosis Disk Utility Dore El Capitan extended attributes Finder firmware Gatekeeper Gerome HFS+ High Sierra history history of painting iCloud Impressionism iOS landscape LockRattler log logs M1 Mac Mac history macOS macOS 10.12 macOS 10.13 macOS 10.14 macOS 10.15 macOS 11 macOS 12 malware Metamorphoses Mojave Monet Monterey Moreau MRT myth narrative OS X Ovid painting Pissarro Poussin privacy realism Renoir riddle Rubens Sargent scripting security Sierra SilentKnight SSD Swift symbolism Time Machine Turner update upgrade xattr Xcode XProtect Statistics * 13,291,348 hits Blog at WordPress.com. Footer navigation * About & Contact * Macs * Painting * Language * Tech * Life * General * Downloads * Mac problem-solving * Extended attributes (xattrs) * Painting topics * Hieronymus Bosch * English language * LockRattler: 10.12 Sierra * LockRattler: 10.13 High Sierra * LockRattler: 10.11 El Capitan * Updates: El Capitan * Updates: Sierra, High Sierra, Mojave, Catalina, Big Sur * LockRattler: 10.14 Mojave * SilentKnight, silnite, LockRattler, SystHist & Scrub * DelightEd & Podofyllin * xattred, Metamer, Sandstrip & xattr tools * 32-bitCheck & ArchiChect * T2M2, Ulbow, Consolation and log utilities * Cirrus & Bailiff * Taccy, Signet, Precize, Alifix, UTIutility, Sparsity, alisma * Revisionist & DeepTools * Text Utilities: Nalaprop, Dystextia and others * PDF * Keychains & Permissions * LockRattler: 10.15 Catalina * Updates * Spundle, Cormorant, Stibium, Dintch, Fintch and cintch * Long Reads * Mac Troubleshooting Summary * LockRattler: 11.0 Big Sur * M1 & M2 Macs * Mints: a multifunction utility * LockRattler: 12.x Monterey * VisualLookUpTest * Virtualisation on Apple silicon * LockRattler: 13.x Ventura Secondary navigation * Search Post navigation The Titanic and the Taj Mahal: paintings of Colin Campbell Cooper Solutions to Saturday Mac riddles 180 Search for: [ ] [Search] Begin typing your search above and press return to search. Press Esc to cancel. * Follow Following + [croppe] The Eclectic Light Company Join 3,077 other followers [ ] Sign me up + Already have a WordPress.com account? Log in now. * + [croppe] The Eclectic Light Company + Customize + Follow Following + Sign up + Log in + Copy shortlink + Report this content + View post in Reader + Manage subscriptions + Collapse this bar %d bloggers like this: [b]