Hacker News new | ask | show | jobs
by takeda 3172 days ago
> Interesting, is that because of the load? It seemed "modern" SSDs have GCs good enough that trim isn't quite necessary anymore to ensure good performances in consumer loads.

A drive has no way to tell whether filesystem is using a given block or not. TRIM is a way for the filesystem to tell it that. So I would imagine the GC that you're referring to is working on the blocks marked with TRIM.

BTW, besides running fstrim from cron on Linux, you can also use discard flag to mount the drive, so the filesystem sends TRIM command when files are deleted.

1 comments

> So I would imagine the GC that you're referring to is working on the blocks marked with TRIM.

Not necessarily. Since flash doesn't support in-place modification of data, any change to a portion of a file (or other FS data structure) that writes less than a contiguous 16MB (depending on the flash) will create a need for GC on the drive with or without TRIM. You can put a drive into a state of needing to do a lot of GC even without changing the quantity of live data.