• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Does TRIM on SSD/NVMe hurt life of drive?

Joined
Jan 31, 2005
Messages
2,102 (0.29/day)
Location
gehenna
System Name Commercial towing vehicle "Nostromo"
Processor 5800X3D
Motherboard X570 Unify
Cooling EK-AIO 360
Memory 32 GB Fury 3666 MHz
Video Card(s) 4070 Ti Eagle
Storage SN850 NVMe 1TB + Renegade NVMe 2TB + 870 EVO 4TB
Display(s) 25" Legion Y25g-30 360Hz
Case Lian Li LanCool 216 v2
Audio Device(s) Razer Blackshark v2 Hyperspeed / Bowers & Wilkins Px7 S2e
Power Supply HX1500i
Mouse Harpe Ace Aim Lab Edition
Keyboard Scope II 96 Wireless
Software Windows 11 23H2 / Fedora w. KDE
Does TRIM on SSD/NVMe hurt life of drive?
 
Joined
Jan 3, 2021
Messages
3,775 (2.53/day)
Location
Slovenia
Processor i5-6600K
Motherboard Asus Z170A
Cooling some cheap Cooler Master Hyper 103 or similar
Memory 16GB DDR4-2400
Video Card(s) IGP
Storage Samsung 850 EVO 250GB
Display(s) 2x Oldell 24" 1920x1200
Case Bitfenix Nova white windowless non-mesh
Audio Device(s) E-mu 1212m PCI
Power Supply Seasonic G-360
Mouse Logitech Marble trackball, never had a mouse
Keyboard Key Tronic KT2000, no Win key because 1994
Software Oldwin
No. It should actually improve SSD life a little, especially if it's mostly full most of the time.
 
Joined
Feb 10, 2023
Messages
873 (1.20/day)
Location
Belgium
System Name Prometheus
Processor AMD Ryzen 7 9800X3D
Motherboard ASUS ROG Crosshair X870E Extreme Gaming Wifi
Cooling AIO Cooler Master MasterLiquid 360
Memory 32GB DDR5 6000Mhz CL30
Video Card(s) Gigabyte GeForce RTX 3060 OC Edition 12GB
Storage Samsung 970PRO 2TB, Samsung 990PRO 4TB, WD SN850X 2TB, Samsung 980PRO 2TB. WD GOLD HDD 8TB
Display(s) Corsair XENEON 32UHD144 32" 4K UHD gaming monitor
Case Cooler Master HAF
Audio Device(s) Creative Sound Blaster AE7 + Logitech Z-5500 500W 5.1.
Power Supply Corsair AX850 Titanium.
Mouse Logitech MX Master 3
Keyboard Corsair K95 RGB
Software W10-11 Enterprise- Linux Mint 22.1 Cinnamon Edition.
No, TRIM does not hurt the life of an SSD. TRIM is a command that tells the SSD which blocks of data are no longer in use and can be erased. This helps the SSD to perform better and last longer, as it avoids unnecessary write operations and frees up space for new data. On the contrary using an SSD without TRIM can hurt the life of the SSD.
 
Last edited:
Joined
Jan 31, 2005
Messages
2,102 (0.29/day)
Location
gehenna
System Name Commercial towing vehicle "Nostromo"
Processor 5800X3D
Motherboard X570 Unify
Cooling EK-AIO 360
Memory 32 GB Fury 3666 MHz
Video Card(s) 4070 Ti Eagle
Storage SN850 NVMe 1TB + Renegade NVMe 2TB + 870 EVO 4TB
Display(s) 25" Legion Y25g-30 360Hz
Case Lian Li LanCool 216 v2
Audio Device(s) Razer Blackshark v2 Hyperspeed / Bowers & Wilkins Px7 S2e
Power Supply HX1500i
Mouse Harpe Ace Aim Lab Edition
Keyboard Scope II 96 Wireless
Software Windows 11 23H2 / Fedora w. KDE
My thought also, but was on a IT Tech summit, and there was a guy from Lenovo Server Group, mentioning, that it was not all good, but maybe i didn't hear all of what he said. Maybe it was with drives in RAID, or some other drive system....
 
Last edited:
Joined
Feb 10, 2023
Messages
873 (1.20/day)
Location
Belgium
System Name Prometheus
Processor AMD Ryzen 7 9800X3D
Motherboard ASUS ROG Crosshair X870E Extreme Gaming Wifi
Cooling AIO Cooler Master MasterLiquid 360
Memory 32GB DDR5 6000Mhz CL30
Video Card(s) Gigabyte GeForce RTX 3060 OC Edition 12GB
Storage Samsung 970PRO 2TB, Samsung 990PRO 4TB, WD SN850X 2TB, Samsung 980PRO 2TB. WD GOLD HDD 8TB
Display(s) Corsair XENEON 32UHD144 32" 4K UHD gaming monitor
Case Cooler Master HAF
Audio Device(s) Creative Sound Blaster AE7 + Logitech Z-5500 500W 5.1.
Power Supply Corsair AX850 Titanium.
Mouse Logitech MX Master 3
Keyboard Corsair K95 RGB
Software W10-11 Enterprise- Linux Mint 22.1 Cinnamon Edition.
Most RAID (Redundant Array of Independent Disks) setups do not support Trim, that's right.
But they are working on that, to change this.
 
Joined
Jan 31, 2005
Messages
2,102 (0.29/day)
Location
gehenna
System Name Commercial towing vehicle "Nostromo"
Processor 5800X3D
Motherboard X570 Unify
Cooling EK-AIO 360
Memory 32 GB Fury 3666 MHz
Video Card(s) 4070 Ti Eagle
Storage SN850 NVMe 1TB + Renegade NVMe 2TB + 870 EVO 4TB
Display(s) 25" Legion Y25g-30 360Hz
Case Lian Li LanCool 216 v2
Audio Device(s) Razer Blackshark v2 Hyperspeed / Bowers & Wilkins Px7 S2e
Power Supply HX1500i
Mouse Harpe Ace Aim Lab Edition
Keyboard Scope II 96 Wireless
Software Windows 11 23H2 / Fedora w. KDE
Most RAID (Redundant Array of Independent Disks) setups do not support Trim, that's right.
But they are working on that, to change this.

Are you totally sure on that? On hardware level I think it is correct, but seen from the OS, it can't see it's RAID, and I am pretty sure, it can be defragged.
But maybe you are right, if the OS can't see it's a SSD/NVMe, then it is not possible to run a TRIM command...
 
Joined
Feb 10, 2023
Messages
873 (1.20/day)
Location
Belgium
System Name Prometheus
Processor AMD Ryzen 7 9800X3D
Motherboard ASUS ROG Crosshair X870E Extreme Gaming Wifi
Cooling AIO Cooler Master MasterLiquid 360
Memory 32GB DDR5 6000Mhz CL30
Video Card(s) Gigabyte GeForce RTX 3060 OC Edition 12GB
Storage Samsung 970PRO 2TB, Samsung 990PRO 4TB, WD SN850X 2TB, Samsung 980PRO 2TB. WD GOLD HDD 8TB
Display(s) Corsair XENEON 32UHD144 32" 4K UHD gaming monitor
Case Cooler Master HAF
Audio Device(s) Creative Sound Blaster AE7 + Logitech Z-5500 500W 5.1.
Power Supply Corsair AX850 Titanium.
Mouse Logitech MX Master 3
Keyboard Corsair K95 RGB
Software W10-11 Enterprise- Linux Mint 22.1 Cinnamon Edition.
yes, but de-frag is not same as TRIM. It is the RAID system itself that does not know the TRIM command. But there are now some that support the TRIM command.

TRIM does not work on all RAID setups, as some RAID controllers or software do not support or pass the TRIM command to the SSDs.

To check if your RAID setup supports TRIM, you can use tools like CrystalDiskInfo or SSDLife.
 
Last edited:
Joined
Jan 3, 2021
Messages
3,775 (2.53/day)
Location
Slovenia
Processor i5-6600K
Motherboard Asus Z170A
Cooling some cheap Cooler Master Hyper 103 or similar
Memory 16GB DDR4-2400
Video Card(s) IGP
Storage Samsung 850 EVO 250GB
Display(s) 2x Oldell 24" 1920x1200
Case Bitfenix Nova white windowless non-mesh
Audio Device(s) E-mu 1212m PCI
Power Supply Seasonic G-360
Mouse Logitech Marble trackball, never had a mouse
Keyboard Key Tronic KT2000, no Win key because 1994
Software Oldwin
The organisation of data in RAID 5 (distributed parity) is messy and details are not standardised. One sector (as the OS sees it) is mapped to several sectors on the disks, but at the same time several sectors (as the OS sees them) are mapped to one sector on the disks. I'm wondering if TRIM can work properly at all in hardware-based RAID 5.
 
Joined
Feb 10, 2023
Messages
873 (1.20/day)
Location
Belgium
System Name Prometheus
Processor AMD Ryzen 7 9800X3D
Motherboard ASUS ROG Crosshair X870E Extreme Gaming Wifi
Cooling AIO Cooler Master MasterLiquid 360
Memory 32GB DDR5 6000Mhz CL30
Video Card(s) Gigabyte GeForce RTX 3060 OC Edition 12GB
Storage Samsung 970PRO 2TB, Samsung 990PRO 4TB, WD SN850X 2TB, Samsung 980PRO 2TB. WD GOLD HDD 8TB
Display(s) Corsair XENEON 32UHD144 32" 4K UHD gaming monitor
Case Cooler Master HAF
Audio Device(s) Creative Sound Blaster AE7 + Logitech Z-5500 500W 5.1.
Power Supply Corsair AX850 Titanium.
Mouse Logitech MX Master 3
Keyboard Corsair K95 RGB
Software W10-11 Enterprise- Linux Mint 22.1 Cinnamon Edition.
If the raid system supports it, it should work i guess. But i did not tested that yet, so it's just guessing.

The only thing i know is that TRIM isn't a requirement for using RAID 5 with SSD. The storage controller is going to rewrite old block's, clearing cells out over time, in a manner that's agnostic to the storage technology. That's what my co-worker told me.
 
Joined
Mar 18, 2023
Messages
971 (1.41/day)
System Name Never trust a socket with less than 2000 pins
ZFS with its zraid levels supports trim and should usually be better than hardware raid controllers anyway.
 
Joined
Feb 10, 2023
Messages
873 (1.20/day)
Location
Belgium
System Name Prometheus
Processor AMD Ryzen 7 9800X3D
Motherboard ASUS ROG Crosshair X870E Extreme Gaming Wifi
Cooling AIO Cooler Master MasterLiquid 360
Memory 32GB DDR5 6000Mhz CL30
Video Card(s) Gigabyte GeForce RTX 3060 OC Edition 12GB
Storage Samsung 970PRO 2TB, Samsung 990PRO 4TB, WD SN850X 2TB, Samsung 980PRO 2TB. WD GOLD HDD 8TB
Display(s) Corsair XENEON 32UHD144 32" 4K UHD gaming monitor
Case Cooler Master HAF
Audio Device(s) Creative Sound Blaster AE7 + Logitech Z-5500 500W 5.1.
Power Supply Corsair AX850 Titanium.
Mouse Logitech MX Master 3
Keyboard Corsair K95 RGB
Software W10-11 Enterprise- Linux Mint 22.1 Cinnamon Edition.
I know many people still use RAID, also in NAS systems, but sooner or later i think it will be all ZFS.

Both are different technologies that have their own advantages and disadvantages. RAID and ZFS are not mutually exclusive, as ZFS can use RAID levels within its pool of disks.
I also know that ZFS does not work good with hardware raid controller. it's interfere with its direct access to the disks. And raid is just more widely supported at the moment.
You also need a faster cpu and more ram with ZFS, because it is doing more operations with the data, and not all people are waiting on that to change all the hardware again, with is costly.
 
Last edited:
Joined
Jan 3, 2021
Messages
3,775 (2.53/day)
Location
Slovenia
Processor i5-6600K
Motherboard Asus Z170A
Cooling some cheap Cooler Master Hyper 103 or similar
Memory 16GB DDR4-2400
Video Card(s) IGP
Storage Samsung 850 EVO 250GB
Display(s) 2x Oldell 24" 1920x1200
Case Bitfenix Nova white windowless non-mesh
Audio Device(s) E-mu 1212m PCI
Power Supply Seasonic G-360
Mouse Logitech Marble trackball, never had a mouse
Keyboard Key Tronic KT2000, no Win key because 1994
Software Oldwin
If the raid system supports it, it should work i guess. But i did not tested that yet, so it's just guessing.

The only thing i know is that TRIM isn't a requirement for using RAID 5 with SSD. The storage controller is going to rewrite old block's, clearing cells out over time, in a manner that's agnostic to the storage technology. That's what my co-worker told me.
In some cases, trim can not work, even in theory. It can't work on parity data, which is either distributed over all disks (RAID 5) or stored on a dedicated disk (RAID 4). Of couse SSDs still work without trim, and SSDs like the WD Red SA500 or SN700 are better optimised for that situation, they have more overprovisioned space, I guess.

For parity you want an SSD with good performance and high endurance, since parity can never be trimmed, even when LT adds trim support for the array, also it will have to endure much more writes than the array devices, I would recommend a good NVMe device or an enterprise level SSD.

Unlike many RAID systems, SoftRAID supports TRIM commands on all SoftRAID volumes.
But that's mentioned only in the RAID 1 section, not in the RAID 4 and 5 section.

Some SSD models do not support SSD TRIM for storage pools configured in RAID 5 and RAID 6. To find out if this applies to your SSD models, look them up on the Synology Products Compatibility List and check the Notes section for unsupported features.
Well, "Some". That's interesting.

SSD Trim is only performed on solid state drives that belong to a RAID 0, RAID 1, or RAID 10 group.
 
Joined
Jan 24, 2009
Messages
435 (0.07/day)
Location
New York
System Name Unobtainium
Processor 3600X
Motherboard Gigabyte X570S Aorus Elite AX
Cooling DH15 Chromax Black
Memory 32GB Ripjaws 3200MHz
Video Card(s) EVGA 3080 Ti FTW Ultra w/ Alphacool Eiswolf
Storage 500GB SN750 | 3.84TB Micron 7450| 4TB SP XS70
Display(s) Asus 144Hz display + LG Ultrafine 4k
Case Evolv X
Audio Device(s) Schiit Hel + AKG Q701s
Power Supply Seasonic FOCUS PX-750
Mouse Logitech G502 Hero
Keyboard Filco Majestouch II
Software Windows 11
Without trim your drive would die a hell of a lot sooner. TRIM allows cells not being used to be cleared. Now, when you go to write data your drive isnt moving data that was deleted but still there to write things.

I know many people still use RAID, also in NAS systems, but sooner or later i think it will be all ZFS.

Both are different technologies that have their own advantages and disadvantages. RAID and ZFS are not mutually exclusive, as ZFS can use RAID levels within its pool of disks.
I also know that ZFS does not work good with hardware raid controller. it's interfere with its direct access to the disks. And raid is just more widely supported at the moment.
You also need a faster cpu and more ram with ZFS, because it is doing more operations with the data, and not all people are waiting on that to change all the hardware again, with is costly.
Oh and please tell people to not backup their stuff. I still need a job XD Peoples' mistakes turn into my cake. (sees your sig)
 
Joined
Aug 27, 2023
Messages
302 (0.57/day)
FWIW fitted 2 mSATA cards in iRST RAID0 which supports trim. Unless things have changed then TRIM is not supported in RAID 1. Anyway, fitted about 10 years ago although less than 6 years of on time I think, as hours on time seems to have rolled over but available on the HDD. Pretty much on 24/7 over the last 2 years as measuring some sensors every 6 and 10 minutes. Been rock solid so far.
 
Joined
Feb 1, 2019
Messages
3,799 (1.73/day)
Location
UK, Midlands
System Name Main PC
Processor 13700k
Motherboard Asrock Z690 Steel Legend D4 - Bios 13.02
Cooling Noctua NH-D15S
Memory 32 Gig 3200CL14
Video Card(s) 4080 RTX SUPER FE 16G
Storage 1TB 980 PRO, 2TB SN850X, 2TB DC P4600, 1TB 860 EVO, 2x 3TB WD Red, 2x 4TB WD Red
Display(s) LG 27GL850
Case Fractal Define R4
Audio Device(s) Soundblaster AE-9
Power Supply Antec HCG 750 Gold
Software Windows 10 21H2 LTSC
Trim tells the drive ahead of time which blocks are no longer used, otherwise it only finds out when the file system tells it to overwrite those blocks.

So the effect is the drive can wipe ahead of time mitigating any performance impact of an erase during a write, and this should also allow it to have better wear levelling which if anything improves life of drive.

Scenario, drive was 100% full, has factory supplied 3% over provision, so 3% of capacity used for wear levelling (very small), you then wipe 20%, without trim, there is still only 3% available as drive doesnt know the data can be erased, with trim, it erases the 20%, and now has 23% available for wear levelling.
 
Joined
Jan 3, 2021
Messages
3,775 (2.53/day)
Location
Slovenia
Processor i5-6600K
Motherboard Asus Z170A
Cooling some cheap Cooler Master Hyper 103 or similar
Memory 16GB DDR4-2400
Video Card(s) IGP
Storage Samsung 850 EVO 250GB
Display(s) 2x Oldell 24" 1920x1200
Case Bitfenix Nova white windowless non-mesh
Audio Device(s) E-mu 1212m PCI
Power Supply Seasonic G-360
Mouse Logitech Marble trackball, never had a mouse
Keyboard Key Tronic KT2000, no Win key because 1994
Software Oldwin
Trim tells the drive ahead of time which blocks are no longer used, otherwise it only finds out when the file system tells it to overwrite those blocks.

So the effect is the drive can wipe ahead of time mitigating any performance impact of an erase during a write, and this should also allow it to have better wear levelling which if anything improves life of drive.

Scenario, drive was 100% full, has factory supplied 3% over provision, so 3% of capacity used for wear levelling (very small), you then wipe 20%, without trim, there is still only 3% available as drive doesnt know the data can be erased, with trim, it erases the 20%, and now has 23% available for wear levelling.
That's a very good brief explanation, let me just add that more overprovisioned space should also result in lower write amplification because the controller never, or rarely, has to erase partially written blocks to make space for writing.
 
Joined
Aug 27, 2023
Messages
302 (0.57/day)
The RAID0 I used spanned 85% of the drives with the other 15% left unallocated for the controller's use. Trim works on a sector basis, typically 512Bytes while the drive uses pages to read and write and blocks contain a number of pages. So trimming may leave partial data on blocks that is still being used and with erasing done at block level will be up to the drive firmware when it decides to shuffle stuff around if need be to make free blocks while trying to keep erasures even across the device and to a minimum.

BTW that 15% wasn't calculated but a compromise between usable space for me and giving the controller a bit more to work with. Some people go much higher with provisioning.
 
Joined
Jul 2, 2022
Messages
14 (0.01/day)
Location
Manson, IA
System Name 10th gen i7 32GB DDR4 RTX20708GB 890pro1tb
Processor i7-10750
That's a very good brief explanation, let me just add that more overprovisioned space should also result in lower write amplification because the controller never, or rarely, has to erase partially written blocks to make space for writing.
One reason trim is important and what confuses many everywhere and in this thread is an SSD cannot rewrite to a written sector on the fly like a spinner does, i.e. if literally just 1 1 and 511 0's are in a sector that sector must be fully tosssed into cache to do anything with it (this is also why read-wear leveling becomes important), read, combine, delete, anything that modifies data it requires it be written to a different sector, CANNOT just change a 0 or 1 anywhere, once a sector is written the only thing that can change that sector is the TRIM command which wipes the entire sector and lets the controller know that sector is free for writing again. So you open a txt document that is illogically 512 bits, change a single letter and save, that 512bits txt file is written to a new sector and the controller or the OS will mark the old sector, "to be trimmed" and trim it as scheduled or immediately if you foolishly have no free sectors (you just burned part of your drive if it is in use and you filled it to capacity with 0 overprovisioning) ssds are rated in writes to sectors despite mtbf ratings, usually any current ssd can do 400-700 rewrites for any sector (there will always be a trim between rewrites) I ruined my first ssd cause I filled it up without any overprovisioning while also havinging page on it and that is simply stupid and is the best way to get ssd sector life into the seconds zone.
 
Joined
Aug 27, 2023
Messages
302 (0.57/day)
I think usually when a sector is marked with trim then any reference to it is returned as zero's or ones depending on firmware, from cache and not read from flash media, nor do zero's need to be written to trimmed flagged media.
 
Top