my ssd has slowed way down

Discussion in 'MacBook Pro' started by weslsew, Mar 4, 2012.

  1. weslsew macrumors newbie

    Joined:
    Mar 4, 2012
    #1
    I've got just about a 1 year old ocz vertex 2 in my late 2007 Macbook Pro. I've only got SATA I so I know my speeds will be limited, but my ssd was still pretty fast when I first got it. Since I installed Lion in august, it has become extremely slow, as if something it majorly wrong. I have my original magnetic drive in the optical bay, and that is where I keep most of my stuff, the vertex 2 is only for the OS and my apps, and is only 20GB used out of its 60. I am using encryption on this drive, is that the problem?

    Here are my xbench results, the first is from when I first got the drive in April 11, then when I installed Lion in August, and then today.
     

    Attached Files:

    • 1.png
      1.png
      File size:
      57 KB
      Views:
      60
    • 2.png
      2.png
      File size:
      52.9 KB
      Views:
      68
    • 3.png
      3.png
      File size:
      54.5 KB
      Views:
      57
  2. kaydot macrumors regular

    Joined:
    Sep 15, 2011
    #2
    There have been no significant reports of SSD slowdown in this forum that I can recall. I am very interested to see if other reports begin to show up now that these are starting to get into larger use and the average age is beginning to increase. I particularly like the way you have shown the benchmarks new and old. Hopefully there is some traction on this thread...
     
  3. Gav2k macrumors G3

    Gav2k

    Joined:
    Jul 24, 2009
    #3
    Wirelessly posted (iPhone 4s: Mozilla/5.0 (iPhone; CPU iPhone OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A405 Safari/7534.48.3)

    Are you running trim?
     
  4. dusk007 macrumors 68040

    dusk007

    Joined:
    Dec 5, 2009
    #4
    Try to enable Trim. I also am still only running SL but I had quite some slow down after leaving trim off for a while.
    So I enabled trim and tried a delete all empty space run. Performance increased about 30-40%. It is still odd how poor the vertex 2 performs with incompressible data. I regret buying it a little. It still is more than fast enough for os and apps but for some copy and paste stuff and archive extraction I would have gotten more speed with other drives.
     
  5. Movaiz macrumors newbie

    Joined:
    Feb 21, 2010
    #5
    If Trim is not enabled you will suffer slow downs. Enable Trim.
     
  6. /user/me macrumors 6502

    Joined:
    Feb 28, 2011
    #6
    and if your hair is too long for your liking, you should get a trim :)
     
  7. weslsew thread starter macrumors newbie

    Joined:
    Mar 4, 2012
    #7
    Enabled trim and did an erase all free space with disk utility... it seems I'm now back to when I installed Lion. I just remember reading so much about how great the garbage collection was with the sand force drives that trim wasn't necessary. I wonder if this is not true when using encryption.

    My ssd still isn't back to as fast as it was when I was running snow leopard, could the encryption have anything to do with this?

    One more thing, if I wanted to wipe my ssd and start over as if it was new, how do I go about doing that on a mac? I've seen instructions for pcs that say erasing with zeros doesn't work on an ssd, you need a program that can send an ATA command. Do we have something like this for mac?
     

    Attached Files:

  8. dusk007 macrumors 68040

    dusk007

    Joined:
    Dec 5, 2009
    #8
    I doubt disk encryption is the cause. Mine is not encrypted and it wasn't so much different.

    Encryption might be the cause for the generally slower performance. I would have thought that they have enough AES crunching power in dedicated hardware to handle all the incoming traffic, but still at the very least adds processing overhead which probably causes the decrease in performance.
    I don't know how much less performance one is supposed to expect.

    OCZ used to have most of the special tools only for Windows. Check their websites and see if there are Mac tools there.
    The Garbage Collection was only some thing few people really understood. GC is in a way what defrag tools where for hard drives. With a lot of small random writes there is data all over the place and many pages are only half full or whatever percentage. GC works to fill some pages completely so new writes can be sent to entire pages for max performance and not need to fit snuggly in the spots in between. The latter would just take longer. GC is data consolidation.
    Thus GC isn't really necessary if most of your writes are sequential anyway.
    Some drives do it on the fly and don't suffer much performance loss or none. Trim just helps in marking empty space as such.
    If GC works without Trim it would need some idea of the MFT in NTFS or the FAT, or the HFS complement to achieve the same results. Otherwise how is it supposed to know where the little deleted spots are. It needs to wait until they are overwritten by a system command to know they are now old data. Only then will it know that those sectors are empty and mark them as deleted. Most controllers don't truly write over the old data. They write to a new page and mark the old sectors as deleted. Without Trim the ssd constantly thinks it is almost full and only some of those overwritten small parts are available. New writes almost always only work because they write on stuff that the ssd previously though was still viable data.

    In short GC without Trim is like using your SSD almost filled to the max. Free space will be rather small. GC just manages to consolidate free space.
     
  9. Krazy Bill macrumors 68030

    Krazy Bill

    Joined:
    Dec 21, 2011
    #9
    I'd like to know this as well.
     
  10. IngerMan macrumors 6502a

    IngerMan

    Joined:
    Feb 21, 2011
    Location:
    Michigan
    #10
    I would think you could use what Squeakr posted on for getting ready for trim support. But starting from ground zero, boot from a usb lion, disk utility-format the drive, run the command?

    "You can also do it by booting into single user mode (CMD + s) and then typing fsck -ffy at the root prompt and it will erase all free spec and prep for TRIM."
     
  11. Krazy Bill macrumors 68030

    Krazy Bill

    Joined:
    Dec 21, 2011
    #11
    Thanks Inger. I'll bookmark this thread. When my testicles grow just a tad larger I'll reread some things and give it a go.
     
  12. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #12
    You don't need to wipe anything. Enable TRIM using the hack. Then start your Mac in single user mode. Then type in the command "fsck -ffy" (without the quotes). This will TRIM all free space on the SSD and should give you the same performance as when new. Restart when finished.

    ----------

    Not exactly. For it to erase free space with fsck, you need to have TRIM enabled via the hack. See my post.
     
  13. duffman9000 macrumors 68000

    duffman9000

    Joined:
    Sep 7, 2003
    Location:
    Costa Mesa
    #13
    The problem is due to the Vertex 2. Disclaimer: I owned a 240GB Vertex 2 and the following comes from memory.
    After the drive is in a fully dirty state, compressible write performance drops to about 80MB/s, but that will probably be lower on your small drive. The firmware can't TRIM the drive any faster than that. The only solution is to secure erase the drive and recover from a backup.

    You stated that you erased using the disk utility. This won't do anything to recover full performance. You have to do a secure erase.
     
  14. murphychris macrumors 6502a

    Joined:
    Mar 19, 2012
    #14
    It's actually quite a bad idea to write zero's to an SSD anyway, it increases wear needlessly. It does not prepare the cells to accept new writes either. ATA Secure Erase is the way to handle this.

    I actually find it negligent that Apple's Disk Utility still has antiquated "Security Options" which in fact don't erase all user data from disks. Every SATA disk since 2001 has supported ATA Secure Erase, yet Disk Utility fails to give users access to this basic feature.
     
  15. jomirrivera macrumors 6502

    Joined:
    Mar 15, 2011
    #15
    Download trim enable and enable trim, then boot into single user mode and type fsck -fy then press enter!

    after in finish write reboot and press enter and check your speed now!

    It has worked for me in the past.
     
  16. murphychris macrumors 6502a

    Joined:
    Mar 19, 2012
    #16
    http://mackonsti.wordpress.com/2011/11/22/ssd-secure-erase-ata-command/

    It's really important to leave the drive powered on after issuing the command until it completes. Normally this is pretty fast (seconds up to maybe a few minutes) for SSDs but not all firmware implementations do this the same way, and obviously it will take a longer time for HDDs. You have to let it finish, it's not interruptible once the command is issued, and further the disk cannot be used until the drive has completed. In fact, the drive will be secure locked while the erasure is occurring and won't respond to ATA commands, and most likely won't even appear on the SATA bus.
     
  17. wDylan macrumors newbie

    Joined:
    Nov 2, 2013
    #17
    Holy Cow! I registered for this forum just go thank you for your message. Somehow I missed the single user fsck bit. I just went from an xBench test score of 166.78 to friggin 434.95!!!

    ERMAHGERD! It's like Chrimmas!

    Thank you!
     

    Attached Files:

  18. comics addict macrumors 6502a

    Joined:
    Feb 16, 2013
    #18
    Does anyone here recommend to enable TRIM on a OWC Mecury Electra 6G SSD ? The manufacturer says otherwise. Even though from my understanding they're functions are entirely different. :/
     
  19. yliu macrumors regular

    Joined:
    Jun 15, 2009
    #19
    Does OWC recommend to disable TRIM?

    TRIM should be enabled for all SSD drives.
     
  20. jomirrivera macrumors 6502

    Joined:
    Mar 15, 2011
    #20
    you are very welcome sir!
     
  21. murphychris macrumors 6502a

    Joined:
    Mar 19, 2012
    #21
    Tell that to Apple, who disable it for all SSDs except their own. And then also understand that enabling it for all SSDs isn't good advice.

    It depends on the SSD, the file system, and the workload. Since trim is a non-queue command, it requires clearing of the IO queue before it can be issued. So it's possible enabling trim will get you net worse performance characteristics than on-demand trim or delayed trim or no trim.
     
  22. comics addict macrumors 6502a

    Joined:
    Feb 16, 2013
    #22
    Here you go. http://blog.macsales.com/11051-to-trim-or-not-to-trim-owc-has-the-answer
     
  23. murphychris macrumors 6502a

    Joined:
    Mar 19, 2012
    #23
    Apple and Microsoft are 180 degrees on this issue. It's off for most (maybe all) 3rd party SSDs, and on for their own branded SSDs. Microsoft enables it for everything. So it's weirdly funny to see OS X users geeking out every OS X release to feverishly enable TRIM, while there's this rush on the Windows side to disable it.

    With some exception for certain workloads (lots of small files, with many frequent deletions without immediate replacement - i.e. a lot of email on a client or even a not particularly busy email server let alone a busy one, and certain other database like behaviors; and packing the SSD beyond 80% full) don't really need trim enabled.

    A reasonable compromise would be scheduled trim during typical idle time, something Apple could put into the periodic weekly or monthly script. Unfortunately I'm not finding a manual trim command on OS X like there is on linux. I'd consider using that, but I'm no longer using the kext hack which I think is ill advised for most users.

    And for any use case scenario that needs trim, the problem is that it's such a busy system that issuing trim actually causes performance hangs at the time it's issued. Yes it improves wear leveling and the garbage collector works more efficiently but until we have ncq compatible trim in the next generation of SSDs, we're simply not in a good position always using trim.
     
  24. comics addict macrumors 6502a

    Joined:
    Feb 16, 2013
    #24
    Thank you for the detailed but concise explanation on when/where should one enable TRIM on their SSD. Going by your description I don't seem to need TRIM given my particular workload.
     
  25. murphychris macrumors 6502a

    Joined:
    Mar 19, 2012
    #25
    My SSD is only 60% full. And most of the types of writes I do are 5-20GB virtual machine disk images. So the writes are mixed, but the delete is one big large delete which ought to favor trim. But as it turns out, I've noticed no difference in performance with this Samsung 830, except I'm apparently not getting this random ~10s freeze anymore.

    I think infrequent trim during idle would be ideal, until we get SATA 3.1 drives that support queued trim. But I don't know a way to implement this on OS X in an easy way (which arguably is Apple's job).

    For those who have a clear benefit of using trim, I'd sooner keep two kexts around: the hacked one and the unhacked one, and maybe once a month reboot with the hacked one to single user mode, run fsck_hfs and note that a trim has been issued, and then leave the computer alone for a bit before rebooting it. What's a bit? I don't know. 5 to 30 minutes? Unfortunately the drive firmware developers are very tight lipped about all of this. In single user mode the file system should be pretty much idle, and nothing in the IO queue, so the trim command should be pretty quick - but it's not just one command. Depending on fragmentation and how many freed up blocks there are, it might be thousands of commands to be issued.

    It's like shooting in the dark.
     

Share This Page