To Trim or not to Trim

Discussion in 'iMac' started by Milltek, Sep 25, 2017.

  1. Milltek macrumors regular

    Milltek

    Joined:
    Jun 26, 2011
    Location:
    U.S. Northeast
    #1
    Hi,
    I have a Mid-2010 27" iMac with an OWC SSD installed alongside the original WD spinner. I am curious if there's any solid data on whether or not there's a benefit to switching TRIM on?? OWC blogs a lot about not needing it but that is probably more marketing hype than anything.

    Any help appreciated.
     
  2. kschendel macrumors 65816

    Joined:
    Dec 9, 2014
    #2
    Actually, I've decided that the best answer for me is to do periodic trim, but linux makes that easier than OS X since there's an fstrim command that you can run with the filesystems mounted. I don't know of an OSX equivalent; as far as I know, you have to boot into a rescue system and run filesystem verification from disk utility.

    Having TRIM enabled can be a good thing, a neutral thing, or a mildly detrimental thing depending on workload. If you constantly create and delete bazillions of little files, then having trim enabled can actually slow things down. That's a fairly unusual workload though. I suspect that for the casual or office user and reasonably modern SSD's, trim is no big deal either way. And for a write heavy user, especially writing larger files, trim can be very helpful. I'd enable it if it were me, but I generally wouldn't stress over it.
     
  3. Milltek thread starter macrumors regular

    Milltek

    Joined:
    Jun 26, 2011
    Location:
    U.S. Northeast
    #3
    Thanks for taking the time to reply but this doesn't really help in making a decision. Is there any evidence available anywhere?
     
  4. kschendel macrumors 65816

    Joined:
    Dec 9, 2014
    #4
    The problem is that the usefulness of TRIM will depend a good deal on your specific workload, as well as the SSD implementation. That's partly why you can find online numbers proving that TRIM is good, proving that it's bad, and proving that it's useless.

    This link is a reasonable description of what TRIM. Without TRIM, the SSD has to try to guess at what the filesystem is doing. TRIM is an explicit notice to the SSD of when blocks are freed. Turning on TRIM at the filesystem level with a tool like trimforce tells the filesystem to send TRIM commands whenever blocks are freed, which is probably more frequent than is really necessary, but is probably better than nothing unless your workload is such that files are being created and deleted at a very high rate.
     
  5. Milltek thread starter macrumors regular

    Milltek

    Joined:
    Jun 26, 2011
    Location:
    U.S. Northeast
    #5
    Based on your last response it would appear that if you were to make the SSD run a Trim evaluation and execution occasionally that the SSD would reduce the "wasted" space that had developed since the last run. Is there such a tool that you are aware of?
     
  6. kschendel macrumors 65816

    Joined:
    Dec 9, 2014
    #6
    There are such tools, but they have to be written for the filesystem, not the SSD. It's the filesystem that knows what is in use and what isn't. The simplest such thing that I know about is unfortunately a Linux-only tool called fstrim. For OS/X, you can try the First Aid (verify/repair) from Disk Utility, but whether it will TRIM a mounted filesystem, or whether you have to boot into a rescue system so that you're checking an unmounted filesystem, I'm not sure. (and I'm not sure how to tell.)
     
  7. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #7
    That is just OWC marketing BS. All flash storage benefits from TRIM. There is really no good reason not to enable it. It certainly won't hurt anything if you enable it.
     
  8. Milltek thread starter macrumors regular

    Milltek

    Joined:
    Jun 26, 2011
    Location:
    U.S. Northeast

Share This Page

7 September 25, 2017