3 ms·
How can the SSD controller do any garbage collection if it isn't told which blocks are no longer in use?
by bogantech 2y ago
How can the SSD controller do any garbage collection if it isn't told which blocks are no longer in use?
- wtallis 2y agoThe SSD may not know which logical blocks are no longer in use, but it's quite easy to simply have lots more logical blocks that never get used in the first place. Not having TRIM is only an issue if your OS actually touches the whole drive. A vintage MacOS game library would be tens of gigabytes at most, and any SATA SSD you buy these days is going to be at least double the capacity of a first-gen Mac Mini's hard drive.
- jasomill 2y agoWhile it's true that mechanisms like TRIM can in many cases improve performance and extend drive lifespan, the only thing that's required for SSD garbage collection is for the SSD to be aware of which internal blocks map to logical blocks written by the OS (obviously always true for any standard SSD where garbage collection is even conceptually possible). In practice, all SSDs have internal capacity greater than the nameplate capacity exposed to the OS, so all SSDs start with a reasonable amount of spare capacity; enabling TRIM merely increases the available spare capacity in proportion to the number of currently unused logical blocks vs. never written logical blocks — blocks outside all allocated partitions (unless written by something other than a filesystem [e.g., manually, or via a naïve disk imaging, diagnostic, or RAID rebuilding tool]) and blocks that allocated filesystems have never had the need to use (unlike SSD firmware, traditional filesystems don't practice "wear leveling" when allocating space, so, e.g., a 1TB filesystem that has never contained more than, say, 100GB worth of data at any point will probably contain a large number of LBAs that have never been written, independent of how much data has been deleted and overwritten).