Curcial M4 & Trim

Discussion in 'MacBook Pro' started by dusk007, Sep 5, 2012.

  1. dusk007 macrumors 68040

    dusk007

    Joined:
    Dec 5, 2009
    #1
    After some issues and bad performance. Stalls and such I went back to checking my M4's speed and it is seriously degraded.
    Ever since the ML upgrade I didn't enable Trim.
    It is in SATA 2 so this is what it should look like.
    It is the same SSD of today just the Windows partition as target Disk. (9GB free
    [​IMG]
    The Mac Partition in comparison (21GB free space)
    [​IMG]
    Pretty bad considering that since it runs SATA 2 just to drop below the sata 2 limit it should usually take a while. Yet it is so bad on SATA 1 it could be measured. I am too lazy to check 4k read/write and such with some other software but I don't think it would be very good.

    I would recommend to all with the same drive to enable Trim. Garbage collection without Trim is just useless. The M4 clearly doesn't do great when being full. Having no trim enabled is effectively like running the drive 100% filled.

    I do have quite a high write workload but it is mostly sequential which technically should be easy for garbage collection.
    Now after 27h uptime I am at 72GB writes and 79 GB reads in activity monitor. That includes writes to the HDD and external HDD though so the real value is probably lower but it is difficult to pin point how much lower. I would guess at 55-60GB SSD only.
     
  2. CausticPuppy macrumors 65816

    Joined:
    May 1, 2012
    #2
    I think you've got something else going on there... if the lack of TRIM was causing a performance problem, it would only affect your write speeds... but your read speed is bad too.
     
  3. ramram55 macrumors 6502

    Joined:
    Jul 27, 2012
    #3
    How did you install your osx ? you need to have clean install to get over 100 on both read and write speed.
     
  4. iKIKO macrumors regular

    iKIKO

    Joined:
    Jul 30, 2011
    #4
    i was having the same problem with a kinsgston v200 128g, but after upgrading the ssd software update, the speed went up inmediatly. to 180 write 260 read. not the same as the m4 but maybe you need to update the firmware of the ssd or something ?
     
  5. Irock619 macrumors 68000

    Irock619

    Joined:
    Sep 16, 2011
    Location:
    San Francisco, CA
    #5
    No trim on mine with ML and firmware 000F. My drive has been flawless for almost six months now.
     
  6. Krazy Bill macrumors 68030

    Krazy Bill

    Joined:
    Dec 21, 2011
    #6
    I recently had the same problem with my M4. Searched high and low for "quick" solutions but found none. Even enabled TRIM support and applied the various hacks to no avail.

    In the end, my solution was to simply:

    1. clone the SSD to an external drive.
    2. erase the SSD via Disk utility (no need to secure erase)
    3. restore the clone.

    After a 3 hour nap all was back to normal.

    Still don't know what happened to cause the degradation but I suspect it was some partitioning I had done earlier along with multiple cloning to and fro with Mountain Lion.

    And I don't use TRIM on my M4. I've had these speeds since I got the Crucial over a year ago (other than the aforementioned hiccup of course):


    DiskSpeedTest.png
     
  7. dusk007, Sep 5, 2012
    Last edited: Sep 5, 2012

    dusk007 thread starter macrumors 68040

    dusk007

    Joined:
    Dec 5, 2009
    #7
    Good point but fragmentation on the lowest level would also affect read speeds though not quite as much.
    I will try enabling trim and delete empty space and see what happens.
    I don't have any external partition big enough to fit a complete carbon copy with everything. Would be a bit annoying to go that route as it takes a bit more time.

    @ Krazy Bill what FW are you using?

    Somehow I suspect my drive is just broken.

    UPDATE: Did reboot after Trim enabling. Unfortunately erase free space is not available anymore.
    Tried a few more DiskSpeedTests to check again and those numbers are all over the place. For a second they were back up the next run was down to 30 MB/s than 50 MB/s, 150MB/s, 80 MB/s 60MB/s.
    There is clearly some low level issue.
    I am copy pasting some big 1080p movie until the drive is full. Delete it and will see if that helps.
    Copy speeds for the first try started at 110MB/s for 30 seconds down to 60MB/s.
    The second 10GB chunk is now at 35 MB/s.

    UPDATE 2: Filling the last 2GB was at 16MB/s. That is slow.
    After filling every space save 7.5MB and deleting those dummy files (with Trim)
    everything is back to solid 220/260 MB/s.

    Definitely helped.
     
  8. Arizor macrumors member

    Joined:
    Aug 24, 2012
    #8
    Honestly I'd enable TRIM and leave the computer idling for 3 hours, that should allow garbage collection and TRIM to do some work, maybe you'll get some positive results.
     
  9. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #9
    OP> Boot to single user mode then type "fsck -fy" and that will TRIM all unused space on the drive. The TRIM hack must be enabled for this to work.
     
  10. Krazy Bill macrumors 68030

    Krazy Bill

    Joined:
    Dec 21, 2011
    #10
    This made sense when I did it. Left it idle overnight. No help for me.

    I tried this with my M4. No luck.

    I've stayed on 000F 'cause it ain't broke.

    Seriously, clone it then nuke the bastard. If you suspect a failing drive you've got nothing to lose (except more time).
     
  11. drambuie macrumors 6502a

    Joined:
    Feb 16, 2010
    #11
    SSD specs, and the speed readings are based on sequential writing and reading, which requires a sufficient area of contiguous free space. Your results are more like those of a random read/write test where the test data is scattered throughout the drive. Without trim to mark previously used clusters as free, the drive will continue to use new clusters to maintain performance, eventually filling the drive and causing a lot of fragmentation. Enabling trim will speed up writing, but speed tests will still give low read/write results from the lack of sufficient contiguous space. This condition will probably not be as evident on day to day usage as that's heavier on random read/write operations.

    One solution would be to perform a one time defrag with free space consolidation with trim enabled, then let the drive sit running unused for several hours. Defragging an SSD on an ongoing basis is not recommended, but a one shot run won't hurt it. The other solution, previously described, is to clone the drive, erase it, let it sit for trim to do its job, then restore the cloned install.
     
  12. JTyler82 macrumors regular

    Joined:
    Mar 29, 2011
    #12
    I have an m4, and didn't enable Trim either. I'm seeing normal speeds. I'm guessing it's a busted drive
     
  13. gngan macrumors 68000

    gngan

    Joined:
    Jan 1, 2009
    Location:
    MacWorld
    #13
    Nope. Just installed M4 a week ago. Didn't do a clean install and i have over 100 on both read and write speed.

    I was researching SSD trim and found that M4 has its 'garbage collection' and it's not necessary to enable trim.
     
  14. dusk007 thread starter macrumors 68040

    dusk007

    Joined:
    Dec 5, 2009
    #14
    Seems nobody reads the updates.
    It is back to full speed now. Trimming free space does the trick.

    @Arizor What you suggest wouldn't work. Simply enabling Trim does nothing. First you need to overwrite all the space that is supposed to be free and delete that new data with Trim.
    GC can do nothing no matter the time you give it until you actually delete stuff with trim enabled. GC has no information on what data is free or what data should be consolidated. It works on a really low level.

    @drambuie Well 21-29GB free space should be enough free space.
    Enabling Trim actually has more effects. It doesn't need defragmentation.
    GC does that. All GC does is occasionally take underused LBAs that have free space in them and just combine the data somewhere else. Without Trim the drive thinks all data ever written is still used so it never actually sees any 50% filled LBAs. It only knows data can be deleted once it is overwritten.
    New data is usually written else where and since it officially would overwrite these old bits, those old ones can be marked as deleted.
    Which is why it effectively is a completely 100% filled drive with only the spare area free. The M4 has little spare area.
    With Trim it actually knows all the not needed data and thus GC can work much more efficiently, much sooner.

    I think a defrag run every once in a while would help with wear leveling though. As some OS, App data that never changes will always stay on the same place and never move. Though if they made the controller smart some algorithm should take care of that too.

    Once my 30% free space is actually free I think GC will take care of fragmentation.
     
  15. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #15
    What do you mean by no luck? Just curious, because this has worked for myself and others many times. Are saying the command did not work as expected, or just that you detected no improvement?
     
  16. Minicube macrumors regular

    Joined:
    Jun 5, 2011
    #16
    Yes, even with Trim enabled my M4 disk stopped working one day. This happened after about 9 months of use. I contacted Crucial and they told me to remove the disk from the computer, put into an external case and plug into another computer so it could "clean the garbage." I thought this was nonsense, but I did it anyway and it actually worked. The garbage got cleaned and my disk started working again, good as new.
     
  17. vincent66 macrumors newbie

    Joined:
    Sep 16, 2012
    #17

Share This Page