Sign in with
Sign up | Sign in

In Depth: TRIM And Garbage Collection, Tested

Plextor M5S 256 GB Review: Marvell Inside, With A Twist
By

TRIM

In order to check the functionality of TRIM, we used the  SSD I/O Performance Analysis script provided with the hIOmon I/O Performance Monitor, which allows us to capture TRIM commands (specifically, we capture the "Manage Data Set Attributes (MDSA)" I/O operations that make TRIM action requests).

We create identical files on each drive. The first file is 178.5 GiB, and the second file is 27.5 GiB. We delete the 178.5 GB file, wait one minute, and then delete the second one. In the tables below, we record each deletion as a separate event.

Delete 178.5 GiB File

Plextor M5SCrucial m4Samsung 830
Response Time (ms)56.3472802.742829.0526
I/O Operations Performed1
1
1
I/O Operation Queue Depth1
1
1
MDSA Request Count1
1
1
TRIM DSR*191 662 915 584 (178.5 GiB)
TRIM Single IOP**191 662 915 584 (178.5 GiB)
Delete 27.5 GIB File

Plextor M5SCrucial m4Samsung 830
Response Time (ms)8.736
13.3237
2.81
I/O Operations Performed1
1
1
I/O Operation Queue Depth1
1
1
MDSA Request Count1
1
1
TRIM DSR*29 527 900 160 (27.5 GiB)
TRIM Single IOP**29 527 900 160 (27.5 GiB)


* TRIM DSR is the total combined length of the blocks indicated within the "Data Set Ranges (DSR)" specified by the TRIM command; each DSR identifies the particular set of blocks that are to be trimmed.

** TRIM Single IOP is maximum total combined lengths of the DSRs specified by a single TRIM command (that is, the maximum total number of bytes specified by a single TRIM request).

Crucial's m4 takes significantly longer to respond to each TRIM command than Plextor's M5S. It would appear as if Plextor made specific optimizations for TRIM compared to the m4, which employs the same controllers. However, Samsung's 830 comes out faster than either Marvell-based SSD.

hIOmon does give us a glimpse into how long it takes for TRIM operations to complete, but it can't tell us when the drive subsequently tackles garbage collection, a separate operation within the SSD.

Garbage Collection

The process whereby stale blocks of memory are reclaimed via reading and rewriting is called garbage collection, and it plays an important role in maintaining SSD performance. This capability can be implemented in different ways, and the way a vendor schedules garbage collection plays a big role in determining a drive's performance characteristics.

Idle-time garbage collection, for instance, handles this housekeeping task whenever the drive is not busy, leaving the SSD in an optimized state for future use. According to Plextor, its Instant Restore technology can capitalize on idle periods to clean the M5S. Drives in client environments generally spend more time idle than active, so there's plenty of time for garbage collection to do its job without affecting performance negatively. Plextor claims that its specific implementation can reclaim up to 10 GB of shape in less than half of a second when the M5S is idle. 

How does this pan out in practice, though? We placed two files on each drive. The first one takes up 178.5 GiB of space, and the second one consumes 32 GiB, leaving 27.9 GiB of available capacity. Then, we create an Iometer file that fills the remaining free space, proceeding to run a 4 KiB 100% random access pattern. Because the SSDs are already full, there's no space available for garbage collection to do its job. Consequently, it doesn't take very long for performance to tank.

The whole time we monitor write speeds using Windows' built-in Performance Monitor, allowing us to visualize what's happening. The Y–axis reflects performance in MiB/s, while the X-axis is time (an 80-second interval and one-second sample time). Idle periods are compressed in each graph, but were about eight minutes long. Degraded performance is apparent in Zone A of each chart.

Plextor's M5S peaks at around 73 MiB/s, but there are also intermittent periods where performance drops quite significantly. Crucial's m4 peaks just below 90 MiB/s, though are even more pronounced periods where performance gets hammered. Samsung's 830 falls within a much tighter performance range, between 35 MiB/s and 80 MiB/s.

Plextor M5S

As mentioned, there is no free space on the drive within Zone A. So, we delete the 32 GiB file, taking us into Zone B as Iometer continues running its 4 KiB random access pattern. Although there is now 32 GiB of available capacity, we haven't allowed any idle time for Plextor's Instant Restore technology to work. The M5S responds to this, apparently, by stalling host writes for about 11 seconds. Presumably, this lets the garbage collection process to clean the 32 GiB of vacated space. Once host write activity resumes, Plextor's M5S writes at a much faster pace until the 32 GiB of clean capacity runs out.

The m4 responds similarly, though write activity stalls out for closer to 15 seconds. Again, we assume that's due to garbage collection taking precedence over host writes.

Samsung's 830, in the third chart down, behaves very differently. Deleting our file doesn't suspend write activity, and even more impressively, the drive sustains faster write performance for a period considerably longer than the 32 GiB of freed-up capacity.

Crucial m4

Zone C is where Plextor's M5S and Crucial's m4 start to incur a performance degradation again. This time, however, the 32 GiB of available capacity prevents the drives from suffering as much as they did in Zone A. Meanwhile, Samsung's 830 doesn't encounter a Zone C; its performance plows through without degradation.

At the end of Zone C, we let the drives idle for about eight minutes. Then, we fire up the Iometer random access pattern again, illustrated in Zone D. The results show that each drive triggers idle garbage collection during the rest period. Plextor's M5S serves up constant performance of around 73 MiB/s until write activity consumes around 11 GiB of space, at which point performance reverts back to Zone C. Crucial's m4 peaks at just over 90 MiB/s, but does not demonstrate the consistency seen from Plextor's M5S. The 830's performance jumps in Zone D, with peaks around 85 MB/s and troughs closer to 70 MB/s.

Samsung 830

Our graphs suggest that the Marvell-based Plextor and Crucial drives employ a similar garbage collection process, though the M5S enjoys more refined performance. Both SSDs appear to start garbage collection as soon as the drives are idle. However, if write activity prevents an idle state, the controller appears to interrupt host requests to facilitate clean-up.

You typically won't even notice this on the desktop, since you'll spend more time idle. So, write speeds should always remain optimal. Samsung's 830 makes sure of it, though, by appearing to execute foreground and idle-time garbage collection extremely effectively.

React To This Article