Hacker News new | ask | show | jobs
by amir 1238 days ago
Lack of OS-level TRIM support will slow down writes. TRIM also allows SSDs to maintain wear leveling.
2 comments

The trick I've heard to use SSDs on devices without TRIM is to just leave like 15% of the drive unprovisioned (i.e. create a single partition smaller than the drive) to give the drive's built-in garbage collection plenty of slack space to work with.

If you're working with vintage machines they all have drive size limits in the 2-8 GB range anyway so you'll end up doing that anyway as you can't get SSDs that small

You can't just leave the space unprovisioned in general. It's a crapshoot weather the drive will automatically over-provision using the unprovisioned space. I've never personally seen one that does this. With samsung, crucial, and other major brands you need to use their proprietary tools to change the over-provisioning percentage (before doing any formatting/creating partition table).

So, to anyone else trying this, make sure to do it before you create the partition table.

You get lots of benefit from permanently-trimmed space that is never used, even if it isn't explicitly "over-provisioned".

The underlying storage always has lots of free space, and thus is likely to have A) lots of pre-erased pages, and thus B) doesn't need to relocate as much stuff often to make contiguous chunks to erase, and thus C) write amplification is much lower.

Today the SSD microcontroller will do TRIM by itself.
Do you mean that it will automatically TRIM a block of all zeros? Or that it will itself try to parse filesystem structures and TRIM blocks that it can imply are un-used?
Can you list even one drive that internally parses filesystem data and guesses empty space to trim?