BlogVibe

Performance Over Time & TRIM

My biggest issue with Samsung SSDs in the past has been their extremely poor performance over time. Samsung doesn't do a lot of active garbage collection while writing in order to maintain ultra high write speeds, instead it prefers to clean up the drive during periods of little to no IO activity. Unfortunately this approach can result in pretty poor performance over time. In the old days the Samsung controllers would hit single digit write speeds, often slowing down to sub-HDD speeds. These days things are a lot better but it's still a concern. To quantify the behavior I filled all user addressible LBAs on the SSD 830, then proceeded to run our random write torture test on the now-dirty drive. After 20 minutes of torture I ran a single sequential read/write pass to measure how much of a hit the drive took.

Sequential read/write performance should be around 400/330 according to Iometer. Here's what the drive looks like after our torture test:

There's a significant drop in performance but the drive is still able to deliver ~100MB/s speeds. This graph is a bit deceptive however. After 20 minutes of 4KB random writes the SSD 830 will only write at a rate of around 20MB/s. By not doing much realtime garbage collection the random write speed can drop significantly over time, but at a lower write speed the 830 isn't penalized as much as other drives. To help deal with this issue I extended the length of our torture test to 60 minutes and re-ran:

Ah that's a lot more like it. Performance drops significantly, down to as low as 50MB/s for the earliest LBAs. Given enough idle time the 830 should correct much of this and obviously TRIMing those LBAs will restore full performance (as you'll see below) but the point is that by delaying the bulk of garbage collection the Samsung SSD 830 is able to drop in performance by a degree that I'm not super comfortable with. This phenomenon isn't exclusive to Samsung, you'll remember that we've complained about it with Crucial drives as well. Other than SandForce and Intel most controller manufacturers tend to follow a similar clean up the mess later approach to firmware design. In my opinion I'd much rather see lower peak performance and get higher worst case scenario performance as it tends to impact the user experience less.

If you are running under a TRIM enabled OS performance does restore to peak quite nicely after a TRIM pass:

ncG1vNJzZmivp6x7orrAp5utnZOde6S7zGiqoaenZIF5gpJoq6GdXaiurr%2FUp55mq6OZenl%2Fj2apnq6ZmsRwgg%3D%3D

Fernande Dalal

Update: 2024-06-28