At what TBW should the NAS SSD be replaced? My cousin quoted 3% as the remaining amount. After I calculated the amount, I advised him not to throw it away in a hurry.
Last month, my cousin sent me a screenshot. The 256G solid-state download disk in Feiniu’s backend had 3% remaining life. He was planning to get a new one for Double 11 and asked me which one to buy. I asked him not to place an order yet, but to send me the smartctl data, and then see how much he had written in the download directory this year. After doing the math, he concluded that this disk could last at least another two years, so he saved the money and added a memory stick.
This incident made me realize that when buying a SSD, everyone will take a look at the TBW parameter, but it is so popular that nine out of ten people don’t know how this number is converted into years left. This article will break down the three words TBW, DWPD and write amplification in human words, calculate the life accounts of three commonly used role disks one by one, and finally give an annual inspection scale, just copy it.
What is TBW: A credit limit card given to you by the manufacturer
Let’s break down the concept first. TBW is Total Bytes Written, the total disk lifetime write quota, in TB. The manufacturer marks this number when selling the disk, which means that from the time it leaves the factory to the time it is scrapped, you have to write so much data into it, and the main control and flash memory have completed their work. 256G SATA disks are usually priced at 150 to 300TBW, 1T NVMe disks are usually priced around 600TBW, and disks with high positioning are priced higher.
Where did this number come from? It’s not a slap on the head from the manufacturer. Flash memory particles have an erasing and writing life. One memory cell of a TLC particle can be erased and written about 3,000 times, while a QLC particle can only be erased and written about 1,000 times. Multiply 256G by 3000 times, and the theoretical quota is 768TB. However, the main control needs to do garbage collection and wear leveling, and write amplification eats up the quota behind the scenes. In addition, sufficient redundancy must be reserved to ensure a five-year warranty. The final range is 150 to 300TBW. So TBW is essentially a "promise after discount", which is a conservative discount that favors your side.
By the way, how conservative this discount is is, you can directly verify it with DWPD. DWPD stands for Drive Writes Per Day, write the whole thing several times a day. Take 300TBW, 256G, and five-year warranty.: 300TBW divided by 256G and then divided by 365 days multiplied by 5 years is approximately equal to 0.64. This means that the manufacturer defaults to writing out 64% of the entire disk every day, and it takes five consecutive years to use up the quota. If you think about your NAS disk, when will half of its capacity be written out?
Cousin's account: See red 3%, in fact, what is burned is the quota, not the life
Back to my cousin’s plate. 256G, nominal 300TBW, smartctl reads the host’s cumulative write volume of 28TB. I did some mental math at the time: Divide 28 by 300, less than 10% of the quota is burned, so why is the balance reported to be 3%?
After searching for a long time, I discovered that the "remaining lifespan" is not calculated directly from the TBW balance. There is a Media Wearout (percentage life) item in SSD SMART, which is maintained by the master itself. In addition to the accumulated write amount, it also refers to things such as write amplification, reserved space consumption, and temperature. My cousin’s disk was a no-name disk bought on Taobao two years ago. The firmware is rough and the Media Wearout algorithm is conservative. In addition, the TRIM of his disk has not been running, the write amplification is high, and the main control reports the worst-case scenario, directly kicking the lifespan into the red zone.
A truly calm judgment depends on two things: The first is the ratio of the cumulative write volume of the host to TBW, 28T to 300TBW. This disk still has 90% of the quota untouched. ; The second is whether the speed and latency of the disk have actually deteriorated. I ran a DD direct write at his house, and the speed in the second half was basically the same as the night I bought it two years ago. Both of these two are present, and the 3% is just a broken light on the dashboard, and the true lifespan cannot be monitored. If you have been scared by the remaining life span, first read How to calculate the amount of writing for that article? , how to read the host write volume and where the unit pit is. ; How do you look at those RAW values of SMART? The article about my cousin who was scared once The inside is more detailed.
write amplification: If you also download 200G, your TBW may be burned three times.
This is the most valuable paragraph in the whole article. Many people think that TBW is calculated based on the data you copy in, but it is not. It is calculated based on the amount of erasure and writing that actually occurs in the flash memory. There is a write amplification factor in between, WA in English.
To use an analogy. When changing a 4K small file on a solid-state disk, it cannot be overwritten in place like a mechanical disk. You must first erase a whole page, move the adjacent data, and then write it back. If you write 4K, the flash memory may actually write 16K or more. This is write amplification. TRIM is patching this up: The operating system tells the disk "These blocks are garbage, you don't need to move them when you recycle them." The main control directly erases the entire block, and the TBW quota is used for the saved transportation.
Why did my cousin's download disk of Media Wearout drop so fast? This is the problem. qBittorrent's seed writing disk is randomly written in fragments of 4K to 1M, which is the hardest hit area for write amplification. The TRIM of this disk is not accessible. The main controller moves garbage blocks every day for garbage collection. The WA is estimated to be between 2 and 3. If you download 200G in one night, the credit limit will actually burn 400 to 600T G. For the same download volume of 200G, TRIM's smooth disk WA can be reduced to about 1.2, and the TBW consumption in a year will be two or three times different. How to implement TRIM on Feiniu and how to configure fstrim scheduled tasks? I am here The solid state speed test article I’ve written about it before, so I won’t repeat it here.
If you want to see the write amplification of your own disk, you can use smartctl to divide the two items. The Percentage Used line of 168 is the actual wear and tear from the main control perspective, and the Data Units Written line of 24 is the host write amount converted into TB. If you compare the two numbers, if it is greater than 1.5, you should check TRIM.
There are three types of role boards, and the lifespan accounts are calculated separately.
There are only three ways to use solid-state drives in NAS, so you can’t mix them up. I made a table with the actual numbers of my three-piece plate and my cousin’s four-piece plate.:
| Role | My/cousin’s plate | Nominal TBW | Annual writing volume | The quota is used up. | What to keep an eye on |
| Download disk | Cousin 256G SATA | 300TBW | About 70TB | Early 4 years | WA and TRIM, whether your credit limit will be burned quickly or not depends on this. |
| cache disk | My 256G (retired) | 300TBW | Write more and read less about 40TB | 7 years | In fact, it is eliminated by capacity and speed first, and TBW cannot be burned to the end. |
| System Docker disk | My home 480G SATA | 600TBW | About 8TB | More than 70 years | Stop focusing on TBW, focus on disk and stability. |
The most counterintuitive thing in this table is the system disk row. Docker containers, virtual memory, and logs all look busy. They only cost about 8 terabytes a year, and the 600TBW quota is enough to last until the next century. So buy a solid-state system disk and just look at the TBW parameters for fun. What you should spend money on is the stability of not losing the disk. The collective loss of the container once will cause more damage than ten times of delay. I am here on this matter. Docker container memory account article The price has been calculated. The download disk is on the contrary. It is the only role in the NAS that has the opportunity to burn through TBW. There are dozens or hundreds of TB there every year, so it is worth carefully selecting.
Account for downloading and selecting disks: Starting from 256G, the TBW standard goes up to 300, QLC is skipped directly, and the quota of 1,000 erasing times cannot withstand the grinding of BT. Don’t even touch second-hand disks. TBW is a consumable. You can take over the credit left by others. The second-hand clean data article I have said before that you can’t even wipe the solid-state ones clean when sold second-hand, let alone when you buy them back.
Annual inspection scale: Take your seat with three correct numbers, only take action when you see red
Don't rely on your feelings when deciding whether to change your disk. Have a physical examination once a year and check the three numbers. I derived this set of scales from my cousin’s disk and tested it with my own disk.:
- Quota ratio: The accumulated write volume of the host is divided by the nominal TBW. It is normally used when less than 80% is used. When it exceeds 80%, it starts to be stocked. When it exceeds 95%, it is called a countdown. My cousin’s piece is 28 versus 300, which is not even 10%.
- wear index: Percentage Used or Media Wearout of smartctl, whether the number jumps quickly or not is more important than the absolute value. An increase of 3 points in a year is normal. An increase of 5 points in a month means that write amplification is burning the quota behind the scenes. Fix TRIM first and then talk about changing the order.
- actual performance: The speed in the second half of the dd direct writing test is compared with the previous year's record. If the speed drops by more than 30% and TRIM cannot be repaired, it is the end. For a disk with normal speed, no matter how scary the percentage of remaining life is, don’t touch it yet.
Just one order, check them all:
smartctl -a /dev/sda | grep -iE "units_written|percentage|wearout"
By the way, don’t relax your backup strategy just because the “disk is still healthy”. Life comes from life, and bad disks come from bad disks. There are two accounts. The ransomware article and How to make a good backup The old rules remain the same.
wrap up: Don’t panic when you see red, calculate first and then change
What did your cousin do with the plate in the end? Not replaced. I configured TRIM, ran fstrim.timer every week, and cleared the download directory of qBittorrent to complete a wave of seeding tasks. Looking back three months later, Media Wearout's slowdown has obviously slowed down, and the quota ratio is still around 9%. The budget spent on Double 11 replaced the memory, and the container ran more.
summed up in one sentence: When TBW sees red, first look at the write volume ratio. If the ratio is less than 80%, the instrument panel is broken, not the disk. ; The ratio is really there, check the write amplification first, TRIM fixes the quota consumption and immediately slows down the speed. ; All three scales are red. Don’t be cheap when downloading or replacing disks. QLC and second-hand disks are both pitfalls. The calculation is clear. One disk can save half a memory stick, which is more practical than anything else.
