SSD Maintenance
How Trim Works - The OS sends a TRIM command at the point of file deletion The SSD marks the indicated locations as invalid data TRIM Features:► Prevents GC on invalid data► Increases the free space known to the SSD controller TRIM Benefits:► Higher throughput – Faster host write speeds because less time writing for GC ► Improved endurance – Reduced writes to the flash Lower write amplification – Less data rewritten and more free space is available
The OS tracks what files are present and what logical blocks are holding the files
SSDs do not understand the file structure of an OS; they only track valid data locations reported by the OS
When the OS deletes a file, it marks the file’s space in its logical table as free - It does not tell the drive anything
When the OS writes a new file to the drive, it will eventually write to the previously used spaces in the table
An SSD only knows data is no longer needed when the OS tells it to write to an address that already contains data
All SSDs will have some form of GC – it is not an optional feature
NAND flash cannot directly overwrite a page with data; it has to be first erased
One full block of pages has to be erased, not just one page
GC starts after each page has been written one time
Valid data is consolidated and written into new blocks
Invalid (replaced) data is ignored and gets erased
Wear leveling mainly occurs during GC
Garbage Collection (GC) is the process of relocating existing data, deleting stale data, and creating empty blocks for new data
TRIM SSD and GC
The SATA 3.1 specifications Queued Trim Command - allows SATA SSDs to execute Trim without impacting normal operation...
http://www.sata-io.org/technology/6Gbdetails.asp
Wikipedia SSD:
"includes support for the TRIM command to reduce garbage collection for data which the operating system has already determined is no longer valid. Without support for TRIM, the SSD would be unaware of this data being invalid and would unnecessarily continue to rewrite it during garbage collection causing further wear on the SSD."
https://en.wikipedia.org/wiki/Solid-state_drive
https://en.wikipedia.org/wiki/TRIM
http://en.wikipedia.org/wiki/Write_amplification
Mac Pro, Mac OS X (10.7.5), ATI 5770 16GB Samsung SSD Sonnet 6G