TRIM enabled for scratch disk?

Discussion in 'Mac Pro' started by macguy93, Jun 15, 2014.

  1. macguy93 macrumors regular

    Joined:
    Jul 30, 2012
    #1
    Hello Everyone,

    I had a cheap SSD (OCZ vertex 3 120GB) laying around and i thought i would utilize it as a scratch disk until i buy something better. Getting into the more technical aspect of the drive, does having trim enabled or disabled matter to the file being stored on that drive? Would it impair any performance of after effects or premiere if trim was enabled or disabled? or is trim completely irrelevant for this case?

    I understand that the drive is cheap and a bit small, but for now I'm hoping i can get by with slightly better performance while having the media off the same drive as the boot drive.

    Workstation setup:
    1TB HD for archiving
    512GB Apple SSD for OS?Applications
    120GB OCZ SSD for scratch


    Thanks in advance!
     
  2. AidenShaw macrumors P6

    AidenShaw

    Joined:
    Feb 8, 2003
    Location:
    The Peninsula
    #2
    The drive will last longer and be faster with TRIM enabled.

    I can't really think of any reason not to have TRIM enabled. Most systems don't even offer the choice - if the drive supports TRIM the OS uses it.
     
  3. macguy93 thread starter macrumors regular

    Joined:
    Jul 30, 2012
    #3
    I've heard of many ways to enable trim. I hear trim enabler isn't the best app to do this. Are there any other recommended ways of performing this?
     
  4. flowrider macrumors 601

    flowrider

    Joined:
    Nov 23, 2012
    #4
    ^^^^TRIM Enabler works for me. IMHO, the author is one of the Good Guys and deserves our support.

    Lou
     
  5. crjackson2134 macrumors 68020

    crjackson2134

    Joined:
    Mar 6, 2013
    Location:
    Charlotte, NC
    #5
    Trim Enabler is an awesome little applet.

    You can enable Trim yourself through the terminal, Trim Enabler or Chameleon SSD Optimizer. They all do the same thing Apple does, but Trim Enabler keeps a monitor applet in the toolbar that let's you know if Trim becomes disabled for any reason (usually OS updates). It also has other useful features built in.
     
  6. macguy93 thread starter macrumors regular

    Joined:
    Jul 30, 2012
    #6
    how do you enable trim on a drive that is not running your OS? i installed trim enabler, but it says that the current drive i have already has trim enabled (Which my apple SSD does) how do i select a specific drive to enable trim on there?
     
  7. Cindori macrumors 68040

    Cindori

    Joined:
    Jan 17, 2008
    Location:
    Sweden
    #7
    Trim is a system-wide feature, meaning that it will apply to all Trim-supported drives in the system.

    Trim Enabler currently only gives you a status update about the first SSD in your system, but I'm looking to improve this.
     
  8. AidenShaw macrumors P6

    AidenShaw

    Joined:
    Feb 8, 2003
    Location:
    The Peninsula
    #8
    When Trim Enabler is installed, does it "TRIM" all drives - or should one fill free space with a temp file, and then delete it to trigger the "TRIM"?
     
  9. Cindori macrumors 68040

    Cindori

    Joined:
    Jan 17, 2008
    Location:
    Sweden
    #9
    No it does not. Yeah you can do that to instantly trim most part of your disk.
     
  10. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #10
    After you enable TRIM, boot to single user mode (command-s boot) then enter "fsck -fy" without the quotes at the command line and that will TRIM all unused blocks on the drive. Then enter reboot.
     
  11. hfg macrumors 68040

    hfg

    Joined:
    Dec 1, 2006
    Location:
    Cedar Rapids, IA. USA
    #11
    I have found that the Mavericks Disk Utility "Repair" will force-trim all empty space, especially useful for cleaning up a just formatted SSD. There do seem to be some requirements:

    - select the formatted disk, not the top-level disk to "repair".
    - "trim" should be enabled
    - the SSD being repaired must be on a trim-capable interface (i.e. NOT in a USB 3.0 dock or enclosure)

    At the end of the repair status messages, you will see a message that all free space has been trimmed.


    -howad
     
  12. macguy93 thread starter macrumors regular

    Joined:
    Jul 30, 2012
    #12
    With that being said, does that mean that there is no way that i can enable trim for this drive? (if i understand correctly)

    i followed your steps but did not seem to force trim to enable. I just formatted the drive last week and have put nothing on the drive since. i opened Disk utility (while booted in the os. not in recovery) and elected that drive and chose "Repair" but i did not get that message?
     
  13. hfg, Jun 16, 2014
    Last edited: Jun 17, 2014

    hfg macrumors 68040

    hfg

    Joined:
    Dec 1, 2006
    Location:
    Cedar Rapids, IA. USA
    #13
    Perhaps there is another "requirement" that I am unaware of that my system has by default?

    Here is what I see (note the 4th line from the bottom):
    There is a significant delay when it hits the line "Trimming unused blocks." before it finishes the sequence.

    You cannot "repair" the disk that you are currently booted from ... you must either boot from another disk or boot to the recovery partition to perform the "repair". (tnx Cindori)


    .
     

    Attached Files:

  14. DPUser macrumors 6502a

    Joined:
    Jan 17, 2012
    #14
    Aiden, how would you recommend creating the properly sized temp file?
     
  15. Cindori macrumors 68040

    Cindori

    Joined:
    Jan 17, 2008
    Location:
    Sweden
    #15
    Disk Utility will not perform all "Disk Repair" steps (trim included) if you are booted from the same disk. You have to boot recovery partition or another Mac OS.

    Just take some large file (HD-movie?) and copy it until the disk is full. Drag to trash and empty. It's the fastest way without going through the terminal.
     
  16. DPUser macrumors 6502a

    Joined:
    Jan 17, 2012
    #16
    Thank you sir!
     
  17. AidenShaw, Jun 17, 2014
    Last edited: Jun 17, 2014

    AidenShaw macrumors P6

    AidenShaw

    Joined:
    Feb 8, 2003
    Location:
    The Peninsula
    #17
    Cindori's advice, unfortunately, does a tiny bit of wear to your device. (You want to avoid real writes - they are what wears out the disk.)

    The disk utility bit (which really only seems to call "fsck" from a GUI wrapper) is better - since it doesn't actually write to the empty space on the disk, but instead issues TRIM commands for all of the free extents.

    The disk utility bit (or fsck) also gives you explicit feedback - if you don't see the line "TRIMming free blocks" that means that TRIM is not enabled on that disk.

    Copying an HD movie - you'd never know if TRIM is actually enabled or not. You could add a bit of wear to the device and not realize that it did not help at all.

    Don't be afraid of the terminal - it's one of the more powerful features of Apple OSX.

    ___

    For Windows systems, from an elevated command prompt issue the command

    contig -l -n disk:\foo nnnnnnnnnn
    del disk:\foo

    where nnnnnnnnnn is a megabyte or so smaller than you see as the free space for

    dir disk:\

    "contig" is in the SysInternals suite available through Microsoft.

    Note that "contig -l -n" is nearly instantaneous whether you're creating a 4 KiB file or a 4 TiB file. It doesn't write data to the file - it uses the APIs used to create pagefiles to quickly create large, non-sparse files. When you delete the file, the system issues TRIM commands on all of the free'd extents.
     
  18. DPUser macrumors 6502a

    Joined:
    Jan 17, 2012
    #18
    A couple more questions:

    I'm running Mountain Lion on my studio Mac Pro... with Trim enabled, will Disc Utility under this version of OSX give the same results (Trim unused space) as Disc Utility under Mavericks?

    I have multiple SSD's in my MP, one of which is the startup drive. If I run "fsck -fy" with Trim enabled, will it Trim all of my SSDs? Can I specify the drive(s) to be Trimmed at some point?

    Thank You All!
     
  19. hfg macrumors 68040

    hfg

    Joined:
    Dec 1, 2006
    Location:
    Cedar Rapids, IA. USA
    #19
    I don't know when the trim was first available in the Disk Utility Repair function. I noticed it by accident when I was cleaning up some old SSD drives ... and I was running Mavericks at the time. I don't have any systems with older OS versions on them to try ... but you can try it yourself as it is a non-destructive command.

    The Disk Utility method repairs (and trims) only the disk that you have selected. I haven't used the terminal fsck -fy command, but I assume you have to select the disk you wish to use with the shell commands prior to running the fsck command.
     
  20. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #20
    You can make it run on other disks. Enter df in Terminal to get a list of volumes and ID the /dev/disk path to the one you want. It will be something like /dev/disk2s2.

    The run this Terminal command using your real disk number.

    Code:
    sudo fsck_hfs -fy /dev/disk2s2
     
  21. DPUser macrumors 6502a

    Joined:
    Jan 17, 2012
    #21
    Gracias!
     
  22. mcaswell macrumors member

    Joined:
    Dec 22, 2013
    #22
    I interpreted this statement (possibly incorrectly) to mean that on a nMP, because TRIM was enabled (on the internal), it would also be enabled on other SSDs.

    I have a couple of SanDisk SSDs in a Thunderbolt enclosure, and when I checked the System Report, it said TRIM was not enabled on these (just on the internal drive). Ran TRIM Enabler, and now these external drives are showing TRIM as being enabled.
     
  23. Studio K macrumors 6502

    Studio K

    Joined:
    Feb 17, 2013
    Location:
    United States
    #23
    Could I do this from a clone of my system volume on a hard disk attached externally (USB docking station)?
    The 'target' drive is the internal ssd.

    Or do both drives need to be connected internally (via SATA cables)?
     
  24. hfg, Jun 19, 2014
    Last edited: Jun 19, 2014

    hfg macrumors 68040

    hfg

    Joined:
    Dec 1, 2006
    Location:
    Cedar Rapids, IA. USA
    #24
    I think that should work, or you could boot the internal drive into the recovery mode and use Disk Utility from there. You can't "repair" the disk you are logged in to ... I don't think the button is even active in that case.

    The "target SSD" can be internal on a SATA port, or external on a eSATA or Thunderbolt/SATA interface. It won't work if the SSD is on USB 3.0 as trim isn't supported.
     
  25. DPUser, Jul 26, 2014
    Last edited: Jul 26, 2014

    DPUser macrumors 6502a

    Joined:
    Jan 17, 2012
    #25
    Just letting folks know that Mountain Lion Disk Utility will also trim SSDs as part of the Repair Disk process if Trim is enabled before repair. Also, as HFG noted, Boot Drive can't be repaired, so you must boot from another drive to repair the boot SSD. Make sure Trim is enabled on that boot drive, too!

    Thanks for the tip HFG. and Cindori for Trim Enabler.

    As noted by HFG:

     

Share This Page