# SSDs Garbage Collection



## EastWest Lurker (Aug 5, 2015)

Maybe many of you already know this but I did not.

The Crucial M550 512 GB SSD on my Mac had slowed down noticeably. I thought that it was too full and took some stuff off. Still slow. I erased and reformatted the drive. Still slow.

So I called Crucial. The tech informed me that unlike conventional SSDs erasing the SSD does not in fact return it to its original state. He said that I should power it up unconnected to the computer and let it sit for 5-6 hours to perform "Garbage Collection." Or even better, overnight, which is what i did.

Now it is back to its original speed!


----------



## willbedford (Aug 5, 2015)

I have the same SSD in my Mac Pro, and I've also noticed problems streaming samples. How does one power it up unconnected to the computer? Unplug the SATA cable and leave the power cable plugged in?


----------



## EastWest Lurker (Aug 5, 2015)

Well, mine is external but yes.


----------



## sleepy hollow (Aug 5, 2015)

GC gets activated when the SSD doesn't have any work to do. If you're putting your PC in sleep mode regularly, you may want to keep the SSDs powered, so GC can be activated. Check out the advanced settings in the power options.


----------



## chrisr (Aug 5, 2015)

thanks for the info Jay, v useful to know.


----------



## EastWest Lurker (Aug 5, 2015)

sleepy hollow said:


> GC gets activated when the SSD doesn't have any work to do. If you're putting your PC in sleep mode regularly, you may want to keep the SSDs powered, so GC can be activated. Check out the advanced settings in the power options.



I never put my Mac to sleep and the SSD is always powered. The tech at Crucial said this just happens over time sometimes, particularly if the drive is too full.


----------



## sleepy hollow (Aug 5, 2015)

EastWest Lurker said:


> I never put my Mac to sleep and the SSD is always powered. The tech at Crucial said this just happens over time sometimes, particularly if the drive is too full.


I assume it's your system drive? The idle time is probably not long enough for GC to get activated.


----------



## EastWest Lurker (Aug 5, 2015)

sleepy hollow said:


> I assume it's your system drive? The idle time is probably not long enough for GC to get activated.



No it is not my system drive, it is only for streaming samples.


----------



## sleepy hollow (Aug 5, 2015)

EastWest Lurker said:


> No it is not my system drive, it is only for streaming samples.


Hm, strange. It should get enough idle time then. That leaves us with two options:

- don't store to much data on the drive
or
- perform GC "manually" every now and then

Oh well, first world problems... 


edit: I think the indexing on MacOSX might prevent GC from getting activated. I remember reading an article about a permanently running indexing process...


----------



## synthpunk (Aug 5, 2015)

TX for sharing.


----------



## tack (Aug 5, 2015)

Not all flash storage is equivalent in this regard. Enterprise storage (often including "High IOPS" branding) generally does much better in terms of performance degradation. I've a lot of experience with Fusion-io and it holds up spectacularly well against sustained abuse. But who can afford that.

At home I've pretty much settled on Intel flash storage which I've found to be quite consistent. The one common theme is that almost all benchmarks from popular tech sites are rather unhelpful. Who cares about a few extra MB/s of performance when they come to a grinding halt from GC. I'll take consistency any day. But truly the only way to tell is to torture the storage with writes for several days, ideally at least a week. At work, we've seen flash storage do quite well for several days and then around the week marker go into an unstoppable death spiral. (Granted I've not been focusing in that area lately and this was some time ago, but I don't imagine things have changed fundamentally.)


----------



## EastWest Lurker (Aug 5, 2015)

tack said:


> Not all flash storage is equivalent in this regard. Enterprise storage (often including "High IOPS" branding) generally does much better in terms of performance degradation. I've a lot of experience with Fusion-io and it holds up spectacularly well against sustained abuse. But who can afford that.
> 
> At home I've pretty much settled on Intel flash storage which I've found to be quite consistent. The one common theme is that almost all benchmarks from popular tech sites are rather unhelpful. Who cares about a few extra MB/s of performance when they come to a grinding halt from GC. I'll take consistency any day. But truly the only way to tell is to torture the storage with writes for several days. At work, we've seen flash storage do quite well for several days and then around the week marker go into an unstoppable death spiral. (Granted I've not been focusing in that area lately and this was some time ago, but I don't imagine things have changed fundamentally.)


I really don't care about write speeds, only read.


----------



## tack (Aug 5, 2015)

EastWest Lurker said:


> I really don't care about write speeds, only read.


Your workload is dominated by reads and GC was still a problem? Wow.


----------



## EastWest Lurker (Aug 5, 2015)

tack said:


> Your workload is dominated by reads and GC was still a problem? Wow


.. 

It was definitely loading a VE Pro m-frame noticeably slower. Is that not read related?


----------



## playz123 (Aug 5, 2015)

I use Crucial SSDs as well and they are mounted in Black Magic enclosures connected to a 2014 Mac Pro. On the Crucial web site it says "If Trim is present it will handle this background cleanup"...i.e. Garbage Collection. I use a little program called "Trim Enabler" and it indicates Trim is active on all SSD drives. Therefore this suggests to me that it also eliminates the need to worry about garbage cleanup. In addition, even when the computer is off there is still some power going to the Black Magic docks. I do not know if this is sufficient to address the problem as well...there's no info about it on the Black Magic web site, but it may possibly be another solution.

https://www.cindori.org/software/trimenabler/

Trim Enabler was recently updated to "Disk Sensei"


----------



## TeamLeader (Aug 5, 2015)

I was told not to use trim enabler with crucial M500 or OWC SSD drives because they handle things on their own, and trim enabler in that case will be detrimental to the speeds. Hmmm


----------



## EastWest Lurker (Aug 5, 2015)

TeamLeader said:


> I was told not to use trim enabler with crucial M500 or OWC SSD drives because they handle things on their own, and trim enabler in that case will be detrimental to the speeds. Hmmm




The Crucial tech told me that for the Mac, trim gains us very little so he would not even bother.


----------



## playz123 (Aug 5, 2015)

TeamLeader said:


> I was told not to use trim enabler with crucial M500 or OWC SSD drives because they handle things on their own, and trim enabler in that case will be detrimental to the speeds. Hmmm


Strange...that's very different than what I quoted and I read on their web site.

Trim Enabler was updated to Disk Sensei, which also has some additional features.


----------



## TeamLeader (Aug 5, 2015)

So leaving tower macpros on overnight would do the garbage collections if the SSDs are in the internal bays?


----------



## playz123 (Aug 5, 2015)

From Crucial:
Crucial SSDs have a maintenance feature called Active Garbage Collection built into the controller. Active Garbage Collection is triggered when the SSD has power but no data throughput, and does background cleanup on the SSDs. The purpose of this feature is to maintain the SSD's performance in environments where for any reason TRIM is not a possibility, by cleaning out the cells on the SSD as data is removed. *If TRIM is present it will handle this background cleanup,* but if for any reason TRIM can't reach the SSD, Active Garbage Collection is there to take care of the drive."


----------



## playz123 (Aug 5, 2015)

@TeamLeader...From Crucial: On a Mac, press the Options key while powering ON to enter the Startup Manager screen. Leaving the Mac on that screen provides the SSD with power, but keeps it in idle state, so Garbage Collection can function.


----------



## TeamLeader (Aug 5, 2015)

That is good to know playz123. I do know that when we applied trim enabler to a mac with an internal system crucial drive, which also had 4 OWC streaming drives, the Crucial got faster and the OWC's slowed to a crawl.


----------



## playz123 (Aug 5, 2015)

TeamLeader said:


> That is good to know playz123. I do know that when we applied trim enabler to a mac with an internal system crucial drive, which also had 4 OWC streaming drives, the Crucial got faster and the OWC's slowed to a crawl.


All SSDs here are Crucial, so I can't say what trim would do to other drives. That's why I was wondering about what Jay suggested concerning Crucial's information.
By the way, Disk Sensei, as well as turning on Trim, also has some great benchmark tools and other features which I find useful. It not only analyzes the Mac main drive, it does each of the other drives as well.
*******
Jay, just curious...what were your read speeds before and after you did garbage collection, and what did you use as a Tool to benchmark your drives? There's a freebie from Black Magic that I and others have used before that is quite good.


----------



## EastWest Lurker (Aug 5, 2015)

The Blackmagic one is the one I used. My speeds had dipped to below 300, 283 or so.


----------



## chimuelo (Aug 6, 2015)

The main reason I bought Windows 10 and NVMe devices.
Tired of just using half of an SSD so GC and TRIM can keep acceptable transfers optimized.
My first SSD was Kingston that streamed for a few weeks then became a system drive.
AS SSD showed me 65MBps after a few months so I went back to a Raptor 1500 @ 84MBps.
We have come a long way and NVMe is where it's at these days.


----------



## babylonwaves (Aug 12, 2015)

does anybody know if the details lined out on garbage collection also apply for samsung EVO840 SSDs?


----------

