Just as taking out the trash is considered maintenance within your home, garbage collection is also a type of SSD...
maintenance. In spite of its name, however, garbage collection has nothing to do with removing files that are no longer needed. Instead, SSD garbage collection is an automated process that is designed to improve performance.
You may have heard rumors that SSDs are initially very fast but that they get slower over time, especially as the drive begins to fill up. This is exactly the thing that SSD garbage collection is designed to prevent. With proper maintenance, the speed of an SSD can be preserved.
In order to understand why SSDs get slower over time, it's important to know how file systems work. Every file system has its own way of doing things, but generally speaking, when you delete a file, that file is not really gone. The OS does not typically erase the storage blocks that were previously consumed by the file. Instead, the OS simply marks the blocks as being available. The reason why "undelete utilities," such as recovery software, are able to recover files that have been erased is because the file's storage blocks still exist on the disk.
In the past, this method of deleting a file wasn't an issue. The OS would simply mark the blocks as being available, and the hard disk could write new data over the top of the old data. SSDs can't do that. For SSD maintenance, storage blocks have to be erased before they can be overwritten. It is this requirement for erasing previously used blocks that causes SSDs to become slower over time. The SSD garbage collection process erases blocks, making them available for use.
There is one more detail to note about SSD garbage collection, however. Blocks are subdivided into pages. SSDs can write data to a specific page within a block, but erase operations can only be performed at the block level. Therefore, the garbage collection process locates partially used blocks and then relocates the pages from that block to a new location so that the entire block can be erased and made available for use. The goal behind this process is to try to optimize performance by having blocks be either completely empty (and then erasing the block) or completely full.
Dig Deeper on Solid-state storage
Related Q&A from Brien Posey
When healthcare providers need to retrieve medical records from an EHR, keeping in mind where the data is stored will affect how quickly and ... Continue Reading
As business requirements evolve, not every DR tool can keep up. In the age of agile IT, there are drawbacks to consider with a cloud-based disaster ... Continue Reading
Expert Brien Posey explains the storage requirements healthcare organizations should insist on before choosing a vendor and system for their medical ... Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.