Garbage Collection - Samsung 840 White Paper

Samsung solid state drive white paper
Hide thumbs Also See for 840:
Table of Contents

Advertisement

Garbage Collection

By nature, because of the nuances we discussed above, SSDs are a bit obsessive about how they organize their valid data.
They prefer to have it neatly stacked together, and they run more efficiently when they can keep it that way because it
is easier to find free space to write to. Unfortunately, everyday use makes this type of neatness difficult, because the OS
is constantly writing and deleting data of various sizes, leaving data strewn haphazardly throughout
the SSD. Garbage Collection remedies this by combing through the Swiss cheese of data left behind,
collecting any valid data and carefully placing it together. By doing this, invalid data is left separate and
can be erased to make more free space, which means no waiting is necessary when you try to write new
data to a page that may have previously been filled with "garbage" data.
There are two methods of Garbage Collection, one that takes place in the background (when the SSD sits idle) and
one that takes place in the foreground (when the SSD is working with data). Samsung's SSDs use a proprietary
implementation of the latter, as this allows them to actively manage data and create free blocks on demand. Thus, in an
extended workflow where the drive may not have a chance to sit idle and prepare free blocks, Samsung's SSDs are always
prepared for what's next. The chart below shows what happens to performance when an SSD is hammered with a non-
stop data flow for 6 hours. The 840 and 840 PRO Series SSDs level out at a significantly higher performance level, and the
840 PRO is able to hold on to its peak performance longer, than many other drives.
25000
20000
15000
10000
5000
0
0
100
* Results via internal test using SNIA testing machine
TRIM
Modern operating systems have enabled another form of SSD maintenance, TRIM. TRIM is a facility by which the OS can
notify the SSD when data is either marked for erase or no longer valid. TRIM helps to make Garbage Collection more
efficient by preparing invalid data for deletion. Remember, SSDs are new technology, so computers were built to interface
with traditional hard disk technology. Hard disks are not subject to the same write/erase limitations that SSDs are – they
can easily overwrite data in an existing location without erasing it first. Therefore, when the OS "deletes" data, the data
does not actually go anywhere. The space in which it resides is simply marked as "free space" that may be used later. By
default, because it doesn't know it's not working with its longtime HDD companion, the OS doesn't let the SSD know that
a particular piece of data is no longer valid and that its corresponding memory location is now free – after all, there is no
reason to do so. With the introduction of SSDs, however, there is now a compelling reason to increase communication
about file validity between the OS and the storage device. Enter TRIM. TRIM allows the OS to inform the SSD which data
are no longer valid, allowing the SSD to skip over invalid data when performing Garbage Collection instead of moving
Now that we know a bit about why the SSD needs free blocks to be readily available,
we can talk about one of the ways the SSD controller prepares free blocks. One of
those processes is called "garbage collection." This name is a bit misleading, as the
process actually involves the collection of good data, not garbage. The concept,
however, is rather simple.
200
300
840 PRO 256GB
840 256GB
A 240GB
B 240GB
* C 256GB Failed this Test
400
500
600

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents