I need SSD, TRIM and Garbage Collection update

Discussion in 'Mac Pro' started by Doc69, Dec 22, 2012.

  1. macrumors 6502

    Joined:
    Dec 21, 2005
    #1
    I have used a few SSD in the past, first Intel X-25M for my MBP and then then OWC Mercury Electra for another MBP and Mac Pro. Now I need a bigger one (SATA 3, 250GB) for a 2010 Mac Pro and OWC is currently out of them. I'm now wondering of I should wait for OWC or go with another brand.

    My experience with the Intel drive was that it slowed down with time. I have not noticed that with the OWC drives, but I've had occasional "mini freezes" that lasts a few seconds each time. This happened more frequently with the Intel drive than the OWC drives. Is this normal? I imagine it could be the garage collection at work?

    If I understand it correctly, the OWC SSDs takes care of garbage collection themselves and we don't need to enable TRIM. Which other drive brands do the same? I've read many threads on TRIM and have not been convinced that it is an easy or reliable solution to enable it, as it is not officially supported by Apple. And there seems to be some disagreement when and if it should be enabled. And then some say I would have to re-enable after OS upgrades etc. Am I wrong about that?

    It also seems like a lot of people here don't like the OWC drives. Why is that? I'm open to switch brand, but I only want to buy an SSD that will work very reliable and without any tinkering with the terminal etc. Also, as I will use it as the OS drive with Logic Pro, I don't want any "mini freezes" that could ruin a take.

    Any help to choose a new SSD would be greatly appreciated.
     
  2. macrumors 68030

    SDAVE

    Joined:
    Jun 16, 2007
    Location:
    Nowhere
    #2
    Samsung 840 Pro or 830 if you can find a good deal on it.

    When you get them, use Trim Enabler to turn on TRIM.

    Apple uses Samsung SSD's in the rMBP and cMBP and TRIM is enabled.
     
  3. dyn
    macrumors 68000

    Joined:
    Aug 8, 2009
    Location:
    .nl
    #3
    Running TRIM enabler isn't necessary at all. At the moment all ssd's use GC and can use TRIM if the OS does so as well. TRIM and GC are equally good at cleaning up the ssd, they only differ in the way they are doing the clean up. If the ssd is using GC then it'll be good enough. No need to enable TRIM with something that can lead to problems because it is not a supported feature and more of a hack.
     
  4. macrumors 603

    VirtualRain

    Joined:
    Aug 1, 2008
    Location:
    Vancouver, BC
    #4
    GC and TRIM are not the same. GC will aggregate data on an SSD together to free up blocks, but what it can't do on it's own without TRIM is know what data is no longer relevant. For example when a file is deleted, the OS will not inform the drive... it will just rewrite the file's location at a future time. TRIM passes this information to the drive so it can do GC with knowledge of what data needs to be kept and which can be discarded.

    So while some SSDs can maintain decent performance without TRIM, they will all benefit from TRIM and especially when near full and there aren't a lot of unused NAND blocks to work with.
     
  5. macrumors 603

    VirtualRain

    Joined:
    Aug 1, 2008
    Location:
    Vancouver, BC
    #5
    Sorry, didn't address this. The problem is not with OWC, but with the reliability of the last generation of Sandforce SSD controllers which are notorious for premature failure. These controllers are at the heart of every OWC drive. So I would stay away from any Sandforce based drive if one of your priorities is reliability. Samsung, Intel and Crucial appear to have the best reliability. However, I went out on a limb recently and purchased a few OCZ Vertex 4 SSDs and I've been happy with the performance and didn't see any reports of abnormal failure rates.
     
  6. dyn
    macrumors 68000

    Joined:
    Aug 8, 2009
    Location:
    .nl
    #6
    Thus you did not read what I wrote and/or did not understand the following sentence that is in my reply: "TRIM and GC are equally good at cleaning up the ssd, they only differ in the way they are doing the clean up.". GC and TRIM are both developed to clean out the NAND cells that are no longer in use. The way they are doing that is different. What you are explaining here is that difference and their exact workings.

    This is not true at all. TRIM will only clear out the cells that need clearing out. GC does it differently and will run something that looks very similar to defragmentation. With TRIM stuff will still be scattered around the various NAND chips, with GC they won't. Sometimes you benefit from TRIM, sometimes you benefit from GC but these differences are very minor. Both GC and TRIM will allow the ssd to keep a decent performance if one does not fill it up entirely. If you read reviews well you'll find that some ssd's will have a better GC implementation and some will have a better TRIM implementation. Meaning that for some ssd's GC is the better one for maintaining the factory performance and for some this will be TRIM.

    Is this all something users should be worrying about? Absolutely not, the differences are way too minor for that. People should just buy an ssd and use it. And some people should stop causing all this panic about reads/writes, not being able to use TRIM, etc. because it is absolutely ridiculous and unnecessary. The only real problem with ssd's are reliability of controllers such as the Sandforce ones. That is the only thing one should warn others about (or in other words: tell them to read reviews).
     
  7. monkeybagel, Dec 26, 2012
    Last edited: Dec 26, 2012

    macrumors 6502a

    monkeybagel

    Joined:
    Jul 24, 2011
    Location:
    United States
    #7
    Here we go with the TRIM vs GC argument again. Maybe this should be moved to PRSI. LOL.

    Although I am not personally a fan of Samsung all that much with their lawsuit/android stuff, I would have to say I would recommend that drive. Two of my Apple products, a Mac Pro, and a MacBook Pro, both have 512GB Samsung drives OEM. I believe they are 830s.

    I really don't know about the TRIM issue - that is debated so much. I think it is best if the OS supports it, however since Apple restricts its official support to Apple OEM drives, I don't know if the hack is worth it or not, or if it would/could result in a less stable system. This was honestly my main motivations to getting an OEM SSD (although they are way overpriced from Apple) but reliability is paramount for me.

    I also have two Intel 320 drives a 180 and an 80, both in ThinkPads. Of course Windows 7 will enable TRIM automatically if it detects and SSD, and they both work great as well.

    I could recommend Intel or Samsung. Had zero experience with OWC, and I do have a OCZ drive I bought second hand in a 2007 iMac. It works pretty good as well, but I don't trust that brand as good as the Samsung or Intel.
     
  8. macrumors 603

    VirtualRain

    Joined:
    Aug 1, 2008
    Location:
    Vancouver, BC
    #8
    I think we can agree on the role/effectiveness of GC.

    Now, I may be wrong, but I think you misunderstand the value of TRIM. TRIM provides the drive with valuable information about what data is no longer needed. This is information (as far as I know) it cannot get any other way, so without TRIM, any drive's GC is handicapped. If my understanding here is off, please let me know.

    Thus, as I understand it, if you delete a 10GB file off your SSD, the file system will keep track of this but it will not pass this information along to the drive, so the GC still has to assume that 10GB of data needs to be maintained. A TRIM command will notify the drive to trim that data, allowing the drive's GC to treat those NAND blocks like free space.

    So while TRIM may or may not add a lot to an SSD's performance, we can debate that all day long (and as you say, it varies from drive to drive). But there is no arguing that running with TRIM provides what can be an important advantage to any drive's GC routines.
     
  9. dyn
    macrumors 68000

    Joined:
    Aug 8, 2009
    Location:
    .nl
    #9
    Data on disks are not removed immediately. Instead they are thrown out of the filesystem toc (or however it may do that). The data on the disk itself is left alone, the part is only marked as being reusable. Whenever new data comes it will overwrite the old. The problem with any ssd is that over time all the cells are filled with data which causes performance problems. The solution: clean out any cells that are no longer in use. TRIM is a little better at doing this because it can talk to the drive and tell it what to clear out exactly whenever you delete something (throwing it in the trash can is not deleting, emptying the trash can is deleting). GC can not and relies on cells marked as being unused/reusable. It moves around data like defragmentation does.

    I don't mind of someone wants to use TRIM or not but they should know that it doesn't really improve on things at all. What they are doing is using an undocumented and unsupported feature in an OS. You'll run the risk of running into all sorts of bugs that can lead to dataloss. That's quite the risk for something that doesn't give you a noticeable benefit over GC.

    Nowadays using TRIM or GC is not a problem whatsoever and it hasn't been for several years now. The biggest problem with any ssd is reliability. What we are seeing now is that ssd manufacturers are going down the reliability road with Intel being the first.
     
  10. Moderator emeritus

    Hellhammer

    Joined:
    Dec 10, 2008
    Location:
    Finland
    #10
    SSD have had GC since day one, it's not a new feature. You can't use NAND flash without GC as you wouldn't be able to delete anything. TRIM is also part of garbage collection, it's not a method of its own. The GC algorithms have improved a lot in the last few years though.

    No, they are not. Put the SSD in a highly fragmented state and GC alone won't help, or it will at least take hours of idling (random data is tough to process and the more fragmented the drive, the longer it will take). If TRIM is supported, the controller will know what LBAs are no longer in use and it can just send those blocks in for garbage collection, which is much faster and more efficient than relying only on garbage collection.

    Data will always be scattered across multiple NAND chips and dies to enable maximum performance. What you are describing is wear leveling, which ensures that all NAND dies wear out evenly but that has nothing to do with performance or TRIM.

    Yeah, but if you fill the SSD enough, TRIM will be helpful.

    ALL SSDs benefit from TRIM. Some are better designed for environments without TRIM but that doesn't mean that they wouldn't benefit from TRIM.
     
  11. dyn
    macrumors 68000

    Joined:
    Aug 8, 2009
    Location:
    .nl
    #11
    Highly debatable, some agree, some disagree.

    Yes they are and you are underlining what I've been saying. What you are missing here is the word "equally" and the meaning of that word. You can use the word "nearly" as a substitution for it. In other words: it means that there are differences and that one of the two is the better one but the differences are so minor that one can neglect it.

    Wear leveling is something completely different and I am certainly not explaining that!

    No it won't. TRIM/GC only works when you delete something. When everything is filled up it doesn't do anything. And when that ssd is filled up the performance is worse than when you just got it. If you want to get that performance back you need to delete data and let TRIM/GC clear out the unused cells.

    Many people have looked into this and they've found that sometimes GC is better and sometimes TRIM is better thus there is data that shows that the conclusion "all ssd's benefit from TRIM" is false (very funny if you consider that Anandtech is one of them...). The problem is that there is no data that shows specific cases like what happens when a drive is highly fragmented. Most testers test with an average workload. For most people that is enough. However, the differences are very small and it is something we won't notice. They are simply too small to notice.

    In the end it all boils down to the simple fact that someone is using an undocumented feature in an OS that could lead to dataloss to get something that is shown to be not that much better than when it isn't enabled. There are many people that have been using ssd's for 3 years now without enabling TRIM and without any problems.
     
  12. macrumors 68030

    SDAVE

    Joined:
    Jun 16, 2007
    Location:
    Nowhere
    #12
    The day all this TRIM and GC talk goes away, will be the day I'll be happy.

    The OS should automatically enable/disable and the firmware on the SSD should dictate that so it's all automatic.
     
  13. macrumors 603

    VirtualRain

    Joined:
    Aug 1, 2008
    Location:
    Vancouver, BC
    #13
    This statement would suggest you still don't understand what TRIM is doing. TRIM is merely providing additional information to the controller so that GC can work better. It's not an alternative to GC. So while TRIM is not required for effective GC, it can make GC more efficient.
     
  14. Moderator emeritus

    Hellhammer

    Joined:
    Dec 10, 2008
    Location:
    Finland
    #14
    It's not debatable. TRIM is a command sent by the OS that informs the SSD controller that some LBAs are no longer in use. That's all. After that it's up to the controller to do garbage collection to actually delete that data. When and how the controller decides to do that varies.

    Here is one way to look at this: TRIM happens between the OS and the SSD controller. GC happens between the SSD controller and NAND. TRIM alone does nothing because the OS does not have direct access to the NAND.

    And here is the difference: TRIM will delete the data almost immediately while it may take hours of idle time for the GC to do the same.

    Performance after 60 minutes of 4KB random writes (QD32) and 40 minutes of idle time:
    [​IMG]

    Performance after 60 minutes of 4KB random writes (QD32) and a single TRIM pass:
    [​IMG]

    Sure that is not the most realistic scenario for client workloads but if you're running the SSD near full, something similar can happen.

    So who are these many people then? I can show you scenarios all day long where GC alone is much more ineffective than when coupled with TRIM.

    Has it lead to any data loss then? You can't just make up an issue unless there is proof that it has happened. I know some SSDs had problems with TRIM Enabler but none of the cases lead to any data loss as far as I know.
     
  15. macrumors 6502a

    Joined:
    Oct 21, 2005
    #15
    Being totally ignorant on the subject and awaiting delivery of my first SSD (Samsung 830) I'm left utterly confused after reading this/other treads on the subject :confused:
    Would it be safe to say that I should turn on TRIM just to be on the safe side? For those against TRIM it would hopefully just do nothing (except steal some resources on the Mac) ;)

    Something else which confuses me is the enabling of TRIM for non-Apple SSDs. Seems like just about the only game in town for this is to use TRIM enabler, but this page warns against using it, claming that it's a hack to the OSX system and could lead to serious issues. Instead the latter page suggests entering some complex command-line codes.
    I have no problem doing copy/paste with those commands into the command line window but I'm afraid of messing around with that stuff as I wouldn't really know what I was doing. I want a stable system but also want to keep my SSD healthy and last as long as possible, so what do I do?
     
  16. macrumors 68030

    SDAVE

    Joined:
    Jun 16, 2007
    Location:
    Nowhere
    #16
    Turn it on and forget about it :)

    OS X does not have any areas in the OS to enable TRIM. However, the included SSD's (which are Samsung) Apple has enabled them by default.

    I have a feeling OS X 10.9 will have Trim functionality somewhere in the system prefs.
     
  17. Cindori, Jan 3, 2013
    Last edited: Jan 3, 2013

    macrumors 68040

    Cindori

    Joined:
    Jan 17, 2008
    Location:
    Sweden
    #17
    the GC vs TRIM discussion again? :rolleyes:

    ^This.

    That's a non-issue since like, a year back (Trim Enabler v1.1). Trim Enabler v2.2 is safer than those commands now a days. They fail between different OSX builds while Trim Enabler does not.
     
  18. macrumors 601

    GermanyChris

    Joined:
    Jul 3, 2011
    Location:
    Here
    #18
    Yea your older versions were not good at all..I assume the newer ones are better
     
  19. alvindarkness, Jan 3, 2013
    Last edited by a moderator: Jan 3, 2013

    macrumors 6502

    Joined:
    Jul 11, 2009
    #19
    If you look at how the actual patch works its quite simple. A lot of people look at the perl script and wonder what its doing to their system, but if you want to put your mind at east, grab a hex editor such as "0xED", and open up

    Code:
    /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage ..
    If you search for "APPLE SSD", youll see a the text string that the code uses to compare against the model identifiers on your drives (that you can see under the SATA-Device tree in about this mac). If you wanted to manually change the string, you could. For example I could change it to "OCZ-VERTE" (which is the beginning of the string my ocz vertex 3 spits out), and the kext will from that point on check any drive identifier beginning with "OCZ-VERTE" for TRIM capability. The way the perl script works is to zero out the string entirely, effectively making its length zero. The way the code works is that once thats done, when a string compare occurs, it will always be true, so every drive will be checked for TRIM capability, and enabled if its there.

    Theres no huge hacking of code, its a very simple modification, and the result perfectly predictable (if patched correctly, and the previous post seems to suggest the newer trim enabler versions might be ok).

    But here is my 2c on this whole TRIM thing. When I enabled it on both of my Vertex 3 drives (both the original, and the newer max iops model), it caused the occasional pause in responsiveness (cant think of how else to describe it), which I could replicate easily by deleting a a few files in finder - but it would occur all the time, most likely when osx was deleting contents from /tmp and other places in the background. Now the patch is not the blame, its simply the way this particular ssd's firmware functioned.

    My solution wasnt all that novel, but it works. I simply leave TRIM support off in my main OS.. but every few months i boot into a backup OSX install that I have on a USB stick, that has TRIM enabled (never know when itll come in handy), and run the following command in terminal -

    Code:
    ./fsck_hfs -ffy /dev/rdisk1s2
    and presto. It tells me the drive is being TRIM'ed etc and its all done. Gives me a responsive OSX in the meantime, and gives me the piece of mind that the drive is being TRIM'ed at somewhat regular intervals. If I had a drive where enabling TRIM caused no issues in responsiveness, I would not hesitate to simply have it enabled all the time. But having read enough vertex 3 reviews, I know its GC works adequately in the meantime, and to be perfectly honest, I dont notice a huge improvement after TRIM'ing anyway.
     
  20. macrumors 68030

    wonderspark

    Joined:
    Feb 4, 2010
    Location:
    Oregon
    #20
    I had a Crucial M4 256GB SSD for my boot disk for about a year, and with TRIM on, it would act a little glitchy from time to time. For example, there would be little pauses in things, or sometimes any open app would keep running, while not allowing another app to launch. (App would bounce on launch bar for a moment, then stop, and never launch.) However, with just GC, no TRIM, it never does this. Also, it would give a faster AJA System Test result with TRIM off, slower (not much) with TRIM on.

    Recently, I turned on TRIM and switched to a Samsung 830 256GB SSD in the lower ODD bay, and using the M4 in slot 1 as my backup clone, and now it never does this, or it hasn't yet done it. Also, it's just as fast with TRIM on for both SSDs.

    I can't explain it, but that's my observation.
     

Share This Page