Trim enabler?

Discussion in 'MacBook Pro' started by TheSponge, Sep 17, 2013.

  1. TheSponge macrumors member

    Joined:
    Sep 5, 2013
    #1
    Just installed a SSD drive in my Macbook Pro 2011. I keep seeing this TRIM enabler thing popping up on the interwebs.

    Is this beneficial? What does it exactly do? Just increase the writing speed?

    The SSD is a Kingston 120GB SSDNow V300
     
  2. GSPice macrumors 68000

    GSPice

    Joined:
    Nov 24, 2008
    #2
    It does depend on the SSD, but I wouldn't worry about it. I can already bet that you've had absolutely no measurable reason to be concerned about your ssd performance, but what you've read online scares you. Don't worry about enabling TRIM. Read this.

    http://blog.macsales.com/11051-to-trim-or-not-to-trim-owc-has-the-answer
     
  3. dusk007 macrumors 68040

    dusk007

    Joined:
    Dec 5, 2009
    #3
    Most importantly enabling Trim helps your SSD lifetime and keeps performance up when there isn't enough spare area.
    Trim allows the SSD to actually delete data instead of only overwriting it. Without Trim you eventually have a 100% filled SSD even if it appears to you that it is only 40% filled. That leads to a lot of pointless data shuffling (because you actually deleted that data) by the SSD controller which means there is a lot more writes to the nand. And you have limited nand writes. Now for ever GB you write the nand may experience 10GB of writes.

    Trim fixes that by allowing the SSD to know which data you actually deleted and so the controller can stop bothering with it. More free area means the controller does less unnecessary writes and will also keep write performance up. Write performance somethings drops severly after a while. Some idle time garbage collection can help the performance problem but the more active the garbage collection is the more rewrites it will produce.
    Trim is not a substitute for garbage collection. Every modern day MLC-NAND SSD has garbage collection but without Trim it has to do more work, cannot always work optimally and wears out the SSDs quicker.

    Ergo always enable Trim unless it shows a problem.
    The V300 has pretty tiny 19nm nand with only about 2000 earse cycles specs. At only 120GB I would recommend Trim.
     
  4. TheSponge thread starter macrumors member

    Joined:
    Sep 5, 2013
    #4
    Thanks for the info, but that article is from 2011. I am sure things have changed since in regards to technology.

    So my question remains, should it be turned on or not? I honestly don't quite even understand what it still does in regards to the SSD? Does it mean an SSD has a limiting amount of writes before its a junk drive?
     
  5. niteflyr macrumors 6502a

    Joined:
    Nov 29, 2011
    Location:
    Southern Cal
    #5
    Look up TRIM and garbage collection on wiki. Lots of info.
     
  6. GSPice macrumors 68000

    GSPice

    Joined:
    Nov 24, 2008
    #6
    Did you read the comments in the article? It addresses your exact statement. Also, did you see my original statement? Are you seeing any measurable performance decrease? I really think you're not.
     
  7. laurihoefs macrumors 6502a

    laurihoefs

    Joined:
    Mar 1, 2013
    #7
    No, the linked article and its comments are still perfectly valid today.
     
  8. dusk007 macrumors 68040

    dusk007

    Joined:
    Dec 5, 2009
    #8
    Basically yes. It isn't a big issue if you have a big enough SSD and Trim enabled. Server enterprise SSDs have usually better flash that can handle more erase cycles and also the SSDs use more spare area (area that the SSD pretends it doesn't have so there is a max of filled precentage). Consumer SSDs have little fixed spare area.
    There is a limited amount of writes but the issue here is that there is a difference between writes initiated by the OS and how many the SSD has to do because garbage collection is cleaning up so much.
    With small early SSDs the (60GB and smaller) and bad controllers the ratio from supposed writes to actual on flash writes was 10 and higher. Sandforce (your drive has a Sandforce controller) can push it below 1 with enough free space.
    Now we have bigger SSDs and better controllers that all support Trim but the flash is also getting worse. 50nm flash had more erase cycles than 19nm. Flash is the only place were smaller and smaller actually makes it worse.

    Trim simply marks data as deleted. You delete a file on the HDD. All it does it delete the pointer to the file in the address book so to speak. The HDD doesn't care about overwriting data it can do it infinitely more or less. That is why you can often easily recover data you have deleted on an HDD. The data lies around until it is overwritten. The OS without Trim treats an SSD the same. Just that SSD always writes to new blocks and still thinks it has to keep the deleted file around, because the SSD doesn't know it is deleted. Only once the OS tells the SSD to write over the specific LBAs (the pages the whole space is divided into) the SSD knows that it may write over those blocks. It will still write elsewhere and now only mark those blocks as empty. Only now the garbage collection(does sort of the same as the defragmentation you used to know form Windows but on the SSD level) knows that it can consolidate some data blocks that look too much like swiss cheese.
    With Trim the SSD just has more free space to work with. Other times when a block is consolidated maybe 60% of the data in it is actually deleted. Then it rewrites all these completely useless data to different locations just because it thinks it has to. That latter part lets write amplification sky rocket.
    If garbage collection doesn't defragment the drive you run into performance issues because eventually it has to free up new blocks to write data somewhere. Too much garbage collection or too aggressive garbage collection hurts the write cycles and Trim helps to make garbage collection more efficient and less necessary. Without Trim you need a big forced spare area to force the certain fixed amount of maximum fill rate.

    [​IMG]
    The image is linked to an article that is old but the technical reasons for Trim haven't changed. Read the theoretical stuff (this plus the next 2 or 3 pages) the practical numbers are definitely outdated.
     
  9. MyMac1976 macrumors 6502

    MyMac1976

    Joined:
    Apr 14, 2013
    #9
    I'll add my inconclusive answer...

    Enabling TRIM works great on some drives in OS X and terribly on others. I just pulled a Vertex + out of my MacBook and put it in my linux portable. The drive loves TRIM in Linux yet with TRIM working in OS X it was a cluster **** .
     
  10. GSPice macrumors 68000

    GSPice

    Joined:
    Nov 24, 2008
    #10
    Precisely why the OP needs to state if he has any reason to believe the SSD is not working as it should. I continue to posit that he doesn't, and that he needn't touch TRIM.
     
  11. priitv8 macrumors 68030

    Joined:
    Jan 13, 2011
    Location:
    Estonia
    #11
    I enabled TRIM on my Samsung 830 drive and it didn't affect performance at all. I really don't see how OS-side support to SSD controller (TRIM is a hint from OS to controller as explained before) can be a thing to ignore?
    All modern SSD controllers should be TRIM-aware.
    The topic is under discussion for OS X only for the reason, that Apple disabled the function for Non-Apple
    SSD-s. Scripts and software like TRIMenabler just patch the Apple driver to circumvent this drive identification test.
     

Share This Page