10 Replies Latest reply: Jan 26, 2014 10:47 AM by FatMac>MacPro
Nagol5178 Level 1 Level 1 (35 points)

Yet another issue I'm dealing with, I have a Samsung 830 250GB SSD that I'm doing nothing with. It could go to use, as I have an external USB 3.0 enclosure. But will the trim enabler app work with external drives? The trim enabler works for my internal drives since apple didn't support the brand I put inside. That app did enable trim.

 

Let's say, there's no way around this and I can't get trim on the external SSD. What happens? When it gets full do I have to clear it and start over? Or should I just keep this thing lying aside somewhere and not do anything with it. The only use I can think of is it being an external hard drive sort of like a flash drive.

 

Right now, it is in my computer. But it's in my optical bay. I'm getting trim support. But I have no use for it. Because I'm never going to use up even half of the SSD I have in the main bay. And having it in the optical bay causes bluetooth problems. I'd rather just take it out. But I don't want to take it out and not do anything with it.

 

I've read other threads on this but no one seems to provide an answer. Some will say, you won't get trim. Well, okay, I don't get trim. Won't it clear it's self out naturally at some point? Or do you just put something on there, and put something else on there, and just not change things or delete things? Sort of like a flash drive might be used?


MacBook Pro, OS X Mountain Lion (10.8.4)
  • 1. Re: External SSD/Trim USB 3.0 enclosure
    FatMac>MacPro Level 4 Level 4 (2,390 points)

    Best answer I can give is that I just tried it with a 2013 rMBP and a Kingston SSD in an OWC USB 3.0 external enclosure, and using TRIM Enabler 3.0, there's no indication in System Info that TRIM is enabled. Of course, there was no information that it wasn't before I tried it because with USB, there's no line for TRIM status. I think that's because TRIM requires an SATA connection since it appears to be part of the SATA protocol (I'm sure I'll be corrected if I'm wrong).

     

    As far as the importance/necessity of TRIM, I think the issue is that SSD's will erase a file when it's being replaced but not (immediately at least) when it's simply being deleted. That may get taken care of eventually with the SSD's built-in garbage collection routine or, ultimately, when the OS sends a write command to the specific LBA that it (but not the SSD) knows is free. The downside to that is, first, that the process takes time, which slows things down, and second, because of the way SSD's work, until the deleted page(s) the file is on get overwritten, they're moved with the valid data in the block the invalid page is in in preparation for erasure of a different file that's to be overwritten. That leads to write amplification, which is not a good thing for SSD's whose data cells have a finite life. TRIM takes care of dealing with deleted but not overwritten files.

     

    But since you've got the drive and an enclosure for it, and a fast USB 3.0 connection, why not just use it? By the time it dies, I expect prices for that size drive will be way down (if manufacturers even bother making SSD's that small by then - I remember when 40MB was a BIG HDD but try and find one now).

  • 2. Re: External SSD/Trim USB 3.0 enclosure
    Nagol5178 Level 1 Level 1 (35 points)

    It's a Samsung 840, not 830, I had that wrong. I've been using it in the USB 3.0 enclosure. For portable lightroom, and when I get home I put it on my main 4TB hard drive. It seems to be deleting items just like the internal drive. So, the 840 must have a garbage collection or something is just causing it to worok.

     

    I did a speed test with it in the external, it was much faster than the 7200 rpm drive with usb 3.0. I have read that SSD's in a USB 3.0 would be throttled down to the 7200rpm type of speed. But it's not.

     

    Since it's so fast I'm thinking of doing an upcoming Final Cut Pro edit on it so it can render everything quickly and then once I'm done transferring it to the normal external drive and clearing the SSD for the next use and just keep using it over and over like that until it dies.

     

    It is now my go to external, and I have a lot of external drives. About 15. I'm thinking the external SSD is going to be great for working on the file but once it's done putting it on the big drives. Even if it just lasted 2 year's it'd be worth the 250 bucks or whatever it was.

  • 3. Re: External SSD/Trim USB 3.0 enclosure
    FatMac>MacPro Level 4 Level 4 (2,390 points)

    Now that all SSD's have Garbage Collection of some sort, it's no longer a matter of if deleted pages will be dealt with but when. TRIM reduces write amplification and increased the chances that empty blocks will be ready when needed, which are good things, but the GC process will too, if not as cleanly. And with SandForce controllers and their compression algorithms, I worry that something that shouldn't be overwritten might be in the process of TRIMing.

     

    I've been surprised at how fast USB 3.0 can be. If it's communication between a HD and an SSD, I think the HD speed will be the limiting factor. Between two SSD's it's noticeably faster. But what's being written matters too. Running CCC and seeing what's being transferred at any instant while also watching Activity Monitor's Disk Activity transfer rate will show how much longer a bunch of little files take than one big video.

  • 4. Re: External SSD/Trim USB 3.0 enclosure
    Marianco1 Level 2 Level 2 (225 points)

    External USB 3.0 SSD Drives cannot use TRIM.  TRIM commands are only for SATA attached drives.

     

    In fact, any non-SATA connected external drive is not even recognized by the Mac as either Solid State or Rotational.

     

    No need to worry.  Modern SSDs have good enough controllers and caches so that they don't suffer any performance degradation over time.

  • 5. Re: External SSD/Trim USB 3.0 enclosure
    motrek Level 1 Level 1 (25 points)

    TRIM is simply a performance optimization, so the SSD won't waste its time preserving data that doesn't matter (because it belongs to deleted files) instead of just overwriting said data.

     

    So of course you can delete files on an SSD that doesn't have TRIM enabled. The SSD will act just like any other drive, just slower in certain cases.

     

    I have downloaded and used a couple of different tools to try to enable TRIM on an SSD connected via USB. It doesn't seem to work. None of the tools recognize my drive. I think it's because they are just looking at the internal list of drives connected directly via SATA, and not via a USB-to-SATA bridge.

  • 6. Re: External SSD/Trim USB 3.0 enclosure
    Marianco1 Level 2 Level 2 (225 points)

    Note:

     

    It doesn't hurt to turn on TRIM. 

     

    For your internal SSDs, with TRIM on, they will simply do garbage collection more efficiently since the OS tells them which blocks to ignore and which to copy.    

     

    With TRIM off, the SSDs will simply do their normal garbage collection.

     

    For your external non-eSATA drives (i.e. USB, Firewire connected), turning TRIM on has no effect.  They don't receive the TRIM instructions from the OS.  They just go about doing their business as usual.

  • 7. Re: External SSD/Trim USB 3.0 enclosure
    motrek Level 1 Level 1 (25 points)

    Without TRIM, SSDs can only do garbage collection if they are overprovisioned, i.e., have more flash memory than they report, e.g., a 120GB SSD might actually have 128GB of flash. Then it can garbage collect those 8GB since nothing is ever written to them, because the computer thinks the drive is only 120GB.

     

    But if the drive has exactly as much flash as it reports, then it will just get slow once it gets full and TRIM isn't enabled, since there's nowhere to garbage collect the data *to*.

     

    It's a shame that TRIM commands aren't sent to SATA drives over USB, since I'm using an external SSD as a boot drive. If I write more than 2-3GB to it, it gets super slow, until I give it a chance to garbage collect, even though the drive is half empty.

  • 8. Re: External SSD/Trim USB 3.0 enclosure
    FatMac>MacPro Level 4 Level 4 (2,390 points)

    motrek wrote:

     

    ...Then it can garbage collect those 8GB since nothing is ever written to them, because the computer thinks the drive is only 120GB...

     

    ...It's a shame that TRIM commands aren't sent to SATA drives over USB, since I'm using an external SSD as a boot drive. If I write more than 2-3GB to it, it gets super slow, until I give it a chance to garbage collect, even though the drive is half empty.

    Not exactly. Unlike a HD, in which the space that contained a deleted file can simply be overwritten, the block containing a page which needs to be updated needs to first be written elsewhere before the block can be erased and thus made available as free space again. With a really stuffed SSD, "elsewhere" is often the overprovisioning space since there's no space that the OS can recognize left. The overprovisioned space is invisible and thus unavailable to the OS but is used by the SSD controller to write to as part of the GC process. The overprovisioned space is less important to the controller for the GC purpose when there is plenty of free space available to both it and the OS, as is the case with your external. While the GC routines vary among SSD manufacturers and the controllers they install, at least some manufacturers say that an SSD needs some "quiet time" to go about the GC process. For example Crucial says "in order for Active Garbage Collection to have an effect, the SSD needs to have periods of idle time, since that is the only time when the feature is able to run." That might be what's happening in your case.

     

    I agree that it's unfortunate that TRIM commands can't make it through a USB interface. But I recently found that TRIM doesn't work with an eSATA connection either. Using a PCIe card with SATA connections running through a NewerTech Voyager, a Crucial M500 is still seen as a rotational drive to which TRIM cannot be applied. It'll still have to go into one of the Mac Pro's drive bays in order for TRIM to work.

     

    On the flip side, in setting up an OWC Mercury Electra Max 3G SSD in one of those drive bays, I intentionally left about 20% of the drive unformatted, and that space becomes part of the built-in 7% overprovisioning. In the year it's been in use, it's never bogged down due to big writes. And that's despite the fact that TRIM doesn't work with it either, even when it's in a drive bay. It's still seen as rotational.

  • 9. Re: External SSD/Trim USB 3.0 enclosure
    motrek Level 1 Level 1 (25 points)

    "Not exactly. Unlike a HD, in which the space that contained a deleted file can simply be overwritten, the block containing a page which needs to be updated needs to first be written elsewhere before the block can be erased"

     

    Agree, but isn't that exactly what I wrote? The 8GB that isn't reported to the OS gets garbage collected in my example is the overprovisioned space.

     

    BTW, I like your nickname. A friend of mine had a Fat Mac. I started with a Mac SE myself.

  • 10. Re: External SSD/Trim USB 3.0 enclosure
    FatMac>MacPro Level 4 Level 4 (2,390 points)

    I was just questioning "Then it can garbage collect those 8GB since nothing is ever written to them" because the 8GB is written to, just not by the OS. Part of the GC process is wear-leveling because SSD blocks have a very finite life so usage has to be spread around. The overprovisioning space is one area that blocks slated for erasure can be moved to but constant use would kill it; any other free space gets used too. The OS is unaware of that movement but the SSD controller can keep track. And it's a good thing, too, because one of the tricks of some controllers, especially SandForce controllers, is that files being written are compressed on the fly if possible so less drive space is actually being used than the OS expects.

     

    I started with the Mac 512K and then got the upgrade to the Mac Plus. I eventually sold that to get an SE/30, sold that to get a IIci, at which point I stopped selling and started collecting.