Please add a Pinned Post to detail Dietpi state concerning TRIM on sata/nvme SSD

Hi there,

Is there any update concerning the trim and auto (CRON scheduled) trim state we should be aware of?

the SSDOptimization - Debian Wiki often linked for reference seems to be outdated and not up to date “Note that some of the configuration improvements listed below happen automatically today for new installations.” without saying what…
with more and more dietpi installed on mini pc, uasp adapter/hat (trim compatible), and now the RPI 5 nvme friendly, it would be good to pin somewhere the status of support (or unsupport) of dietpi, isn’t it?

Could someone “who knows” about it could make a pinned post?
At least to inform what is already done or not by the current debian/dietpi distrib, so we know what we could do and what we should not do (because already setup)

I guess it should address the “cron schedule trim” AND the overprovisioning question (if i understand well all i read last hours about it, to keep some unformatted (and so unused) Gb to be sure to not hit the 100% free space and allow the disk to reallocate failed bit.
Concerning overprovisioning, I am not sure to understand how it should be done under Linux, I thought we only needed to keep some FREE space on the drive, but on a Linux forum, a user was claiming should make a partition of the wished overprovisioning space, trim it and then delete the partition.

I am not a big fan of chatgpt as he tends to lie but he confirmed and summarized what I always read about it:

  1. Handling defective cells: When memory cells wear out over time, the SSD uses the reserved space to replace faulty cells.
  2. Improving performance (garbage collection and wear leveling): Overprovisioning allows the SSD to efficiently reorganize data and balance wear across cells, which enhances performance and extends the drive’s lifespan.
  3. Reducing fragmentation: Having extra space reduces data fragmentation, improving file access speed.

Benefits of Overprovisioning

Increased durability: It extends the lifespan of the SSD by distributing cell wear more evenly.
Stable performance: It helps the SSD handle write operations more efficiently and maintain high performance over time.
Better error management: Reserved space allows the drive to manage errors and avoid performance degradation.

Overprovisioning typically reserves 7-20% of the drive’s space, depending on the model and configuration.

Thank you for your incredible work and you support, love it since my rpi3, 7 years ago!

TRIM is a good thing on SSD/NVME…as long as you don’t overfill it (say past like 80%)

yeap, that’s where overprovisioning comes in the game I guess

@ThAnEb yes, fstrim is enabled weekly by default, look here.

2 Likes
		G_DIETPI-NOTIFY 2 'Enabling weekly TRIM'
		G_EXEC systemctl enable fstrim.timer

Nice…worse comes to worse…manually verifying it is enabled would be a good thing

sudo systemctl enable fstrim.timer

1 Like