Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Reason077

macrumors 68040
Aug 14, 2007
3,607
3,644
According to the article I linked in my initial post, the problem was with standard TRIM, not queued TRIM.

It will be interesting to see what the outcome is from that incident, but one random installation supposedly having problems with a couple of specific SSD models, vs thousands (or millions) of trouble-free installations over many years does not suggest there is a fundamental issue with TRIM.

I'm willing to bet there is something very specific about their installation, specific to their (presumably) highly customised Linux servers, that is causing this. They're also encountering it on very specific models of SSDs (the Samsung 840/850 Pro line, which is quite different to the more common and mainstream Evo models).

Proceed at your own risk.

Quit with the scaremongering! This is absolutely nothing that any Mac OS X user needs to worry about.
 
  • Like
Reactions: ijbond

hfg

macrumors 68040
Dec 1, 2006
3,621
312
Cedar Rapids, IA. USA
I had recently used the previous Yosemite method to enable trim on my systems:

sudo unzip ~/Downloads/AppleDataSetManagement.zip -d /System/Library/Extensions
sudo touch /System/Library/Extensions


When I performed the 10.10.4 upgrade, I didn't disable this trim first.

After the upgrade, Trim was still enabled for my SSDs without running the discussed "sudo trim force enable" command.

Do I need to do anything to correct this ... or is my Trim properly enabled for 10.10.4 and beyond?

Thanks,
-howard
 

Reason077

macrumors 68040
Aug 14, 2007
3,607
3,644
I had recently used the previous Yosemite method to enable trim on my systems:

sudo unzip ~/Downloads/AppleDataSetManagement.zip -d /System/Library/Extensions
sudo touch /System/Library/Extensions

It's probably ok. Installing the AppleDataSetManagement.kext seems to be how trimforce works, too.

But if you want to be sure, it wouldn't hurt to do a "sudo trimforce disable" followed by a "sudo trimforce enable".
 
  • Like
Reactions: hfg

Ledgem

macrumors 68020
Jan 18, 2008
2,034
924
Hawaii, USA
Quit with the scaremongering! This is absolutely nothing that any Mac OS X user needs to worry about.
While you may be right that the case linked in the article has some other factor going on, I don't think it's "scaremongering" to point out that data loss and corruption happened due to TRIM being enabled (and stopped when TRIM was disabled). Scaremongering would be telling people that they would definitely experience data loss and that they shouldn't enable TRIM.

I think it's better that people know that there may be a risk involved than to dismiss it entirely. We don't know how big or small the risk is, but we have a case clearly showing that there is a risk. No favors are done for anyone by hand-waving it away without a better understanding of why it happened, and knowing how big or small the risk is for the rest of us.

It's their data, and they're free to take the risk or not as they see fit. Let them be informed so that they know what risk they're taking.
 
  • Like
Reactions: dyn

Chippy99

macrumors 6502a
Apr 28, 2012
989
35
TRIM also has little (or nothing) to do with SSD longevity. You're subjecting the NAND to the same number of erase-write cycles regardless of whether you use TRIM or not. The difference is that the slowest-by-far part of the cycle (ERASE) can be performed in advance if you use TRIM.

The above excerpt from your post is incorrect.

Consider working on a 10MB PowerPoint presentation all day, as I do very frequently for my job. MS Office will by default do an autosave every 10 minutes and each time it creates a new saved version and deletes the previous auto-saved file.

So over the course of the day there are roughly 50 x 10MB files lying around that are all deleted data. Half a gigabyte of additional data, compared to the 10MB file you are working on. Without Trim, the SSD will perform GC on all that data, reading and writing and tidying up into nice neat blocks. With Trim, it will simply ignore that data in the GC process and write amplification is significantly reduced.
 

Reason077

macrumors 68040
Aug 14, 2007
3,607
3,644
So over the course of the day there are roughly 50 x 10MB files lying around that are all deleted data. Half a gigabyte of additional data, compared to the 10MB file you are working on. Without Trim, the SSD will perform GC on all that data, reading and writing and tidying up into nice neat blocks. With Trim, it will simply ignore that data in the GC process and write amplification is significantly reduced.

Writing 10MB files should not cause any significant write amplification, TRIM or no TRIM!

NAND block sizes (i.e. the smallest unit that can be erased at once) varies by the type of NAND used, but its on the order of 256K - 2MB. Since a 10MB file would fully occupy multiple NAND blocks, there wouldn't be any need for GC, except perhaps where the edge of the file crosses a block boundary.

Modern SSDs also include "caches" made of SLC NAND, which of course has both a longer life-cycle and smaller block size than the MLC/TLC/V-NAND that make up most of the storage. Small chunks of data that are frequently written can go to this SLC area rather having to GC and erase full blocks of the regular NAND.

Also, TRIM does not prevent the need for GC! You are still always going to have small files that part-occupy NAND blocks. Sure, it may help out the SSD's firmware a little in GC'ing more efficiently, but some degree of GC and write amplification will always occur simply because of the mismatch between NAND block sizes and OS-level HDD block sizes.

So I stand by the claim that the primary benefit of enabling TRIM is the performance improvement resulting from allowing block erasure (and associated GC) to be performed in advance, in the background, rather at the time you write data. It's true that in some scenarios TRIM may also reduce wear somewhat by improving the efficiency of GC. But given the other features that SSDs use to reduce this, and that GC must to some extent still happen anyway, I don't think it makes a big difference.
 
Last edited:

olletsocmit

macrumors 6502
Jun 24, 2010
296
2
USA
I have a new OWD SSD (Extreme Pro) version. I was told that OWC SSD's and a few other companies build TRIM into the SSD somehow. OWC confirmed this to me. is using a new ssd with built in TRIM (or w/e they call it) with osx trim as well just doing double the work?
 

Reason077

macrumors 68040
Aug 14, 2007
3,607
3,644
I have a new OWD SSD (Extreme Pro) version. I was told that OWC SSD's and a few other companies build TRIM into the SSD somehow. OWC confirmed this to me. is using a new ssd with built in TRIM (or w/e they call it) with osx trim as well just doing double the work?

OWC don't "build TRIM in", but they have claimed in the past that their SSD's don't require TRIM. While no SSD *requires* TRIM, it's likely that any modern SSD will benefit from improved performance if TRIM is enabled.

It seems like their marketing line is now "our SSDs don't require TRIM, but enabling it wouldn't hurt". See: http://blog.macsales.com/31602-owc-ssds-built-to-perform-with-or-without-trimforce-command
 

McScooby

macrumors 65816
Oct 15, 2005
1,240
777
The Paps of Glenn Close, Scotland.
I can't see all the fuss really, I enabled it on my samsung 850 pro 1TB, & it recovered my read/write speeds back to 500ish whereas without it they were down at 120/130, anything bricks it that's what time capsule's for, in other news, samsung brought out consumer 850 evo & pro 2TB ssd's today, can't wait to get one o' them bad boys!:)
 

Whatdoino

macrumors newbie
Jul 7, 2015
5
1
It will be interesting to see what the outcome is from that incident, but one random installation supposedly having problems with a couple of specific SSD models, vs thousands (or millions) of trouble-free installations over many years does not suggest there is a fundamental issue with TRIM.

I'm willing to bet there is something very specific about their installation, specific to their (presumably) highly customised Linux servers, that is causing this. They're also encountering it on very specific models of SSDs (the Samsung 840/850 Pro line, which is quite different to the more common and mainstream Evo models).



Quit with the scaremongering! This is absolutely nothing that any Mac OS X user needs to worry about.
I've also reached the view there is nothing to worry about [when using under OS X - not Linux] but given Apple's nice big warning notice when activating trimforce I think Ledgem's comment was legitimate.
 
  • Like
Reactions: chrfr

Whatdoino

macrumors newbie
Jul 7, 2015
5
1
... NAND block sizes (i.e. the smallest unit that can be erased at once) varies by the type of NAND used, but its on the order of 256K - 2MB. Since a 10MB file would fully occupy multiple NAND blocks, there wouldn't be any need for GC, except perhaps where the edge of the file crosses a block boundary. ...

Hi Reason077. Makes sense. Just thinking about this .. Chippy's scenario was 50 autosaves of a 10MB file - assuming the full file gets autosaved - not just the changes, thats 500 MB or given your 2MB SSD blocksize, at least 250 SSD blocks. When the app eventually deletes the autosaves at the end of chippys workday, the SSD [without trim] doesn't know those pages aren't needed anymore - until the OS chooses to write to one or more of those LBAs.

Writing 10MB files should not cause any significant write amplification, TRIM or no TRIM!

agreed as far as it goes - i.e. servicing the 10MB write, but if Chippy is not using TRIM then there are 250 blocks of pages where the OS's LBA's have been freed up - but the SSD doesnt know it.

As the OS recycles those LBAs for other files, the SSD learns about it page by page. When it sees enough invalid pages in a block its GC copies the remaining pages somewhere else - but it didn't need to - if TRIM had been turned on it would have known that they too were invalid - isn't that write amplification over time - the SSD saving pages that are no longer in use by the OS ?
 

Reason077

macrumors 68040
Aug 14, 2007
3,607
3,644
As the OS recycles those LBAs for other files, the SSD learns about it page by page. When it sees enough invalid pages in a block its GC copies the remaining pages somewhere else - but it didn't need to - if TRIM had been turned on it would have known that they too were invalid - isn't that write amplification over time - the SSD saving pages that are no longer in use by the OS ?

Yes, but the SSD doesn't usually have to go and immediate find somewhere to write the data for every single LBA that is written.

In reality, writes first go into a DRAM buffer on the SSD where it waits until it has at least an entire block worth of data, or until a timeout occurs, or until the OS sends a "flush cache" command. When you go and save that 10MB file, the OS file system will typically store it in consecutive LBAs which were previously occupied by now-deleted files. Considering this, even without TRIM a smart enough SSD firmware is most of the time going to have no trouble finding enough NAND blocks that can be fully re-used by the time a write needs to be committed.

Some of the newer, more sophisticated SSDs (like the 850 EVO) not only do DRAM buffering but also have SLC NAND buffers so that small or frequently-changing data can be stored persistently without placing extra wear on the MLC NAND or the danger of losing data due to power failure.

Certainly, you can come up with extreme examples of scattered reads/writes/deletes where there would be far greater write amplification without TRIM, but I think that real-world scenarios for PCs are much closer to the "write 10MB files at a time" end of the spectrum.
 

giovy

macrumors newbie
Jul 13, 2015
1
0
Installed my Crucial MX200 1TB on my Macbook Pro 13" 2011. Everything run smoothly until I enabled TRIM. The computer stopped seeing my SDD... Finally managed to boot the system and see the SDD after a number of attempts. I disables TRIM and now everything seem back to normal. I guess I have a buggy SDD. I will wait until El Captain comes out before enabling TRIM again.

Just sharing my experience... I have no idea what the exact problem was/is.
 

MrNomNoms

macrumors 65816
Jan 25, 2011
1,156
294
Wellington, New Zealand
Installed my Crucial MX200 1TB on my Macbook Pro 13" 2011. Everything run smoothly until I enabled TRIM. The computer stopped seeing my SDD... Finally managed to boot the system and see the SDD after a number of attempts. I disables TRIM and now everything seem back to normal. I guess I have a buggy SDD. I will wait until El Captain comes out before enabling TRIM again.

Just sharing my experience... I have no idea what the exact problem was/is.

I've heard good stories regarding Intel SSD's - they aren't the fastest or use the latest technology but they don't suffer from the bugginess that many other SSD vendors seem to suffer from.
 

SoGood

macrumors 6502
Apr 9, 2003
456
240
Either MacNN or MacCentral just released an article on the use of trim on four Samsung 840 and 850 Evo and Pro drives. It's an ongoing report and there's no problems so far. I don't have the link handy but should be out there.
 

b_scott

macrumors 6502a
Mar 31, 2008
721
108
The end result is exactly the same. It tells the OS the it's ok to send TRIM commands to your SSD.

The difference is that where Trim Enabler modified a system kernel extension to do so (which in recent OS X versions, means disabling kext signing, making your system slightly less secure), the "trimforce" command is built in and uses a new API that Apple have added.

Thanks. So with El Capitan, can I safely uninstall Trim Enabler?
 

Reason077

macrumors 68040
Aug 14, 2007
3,607
3,644
Thanks. So with El Capitan, can I safely uninstall Trim Enabler?

You can either remove Trim Enabler and run the trimforce command, or you can upgrade to the latest version of Trim Enabler - which now does pretty much the same thing except with a nice GUI interface.

Also, you don't need El Capitan to use the new TRIM stuff. It's been enabled in Yosemite as of 10.10.4.
 

Reason077

macrumors 68040
Aug 14, 2007
3,607
3,644
According to the article I linked in my initial post, the problem was with standard TRIM, not queued TRIM.

Sounds like it turned out to be a Linux kernel bug, after all.

"Samsung had a concrete conclusion that the issue is not related to Samsung SSD or Algolia software but is related to the Linux kernel. Samsung has developed a kernel patch to resolve this issue and the official statement with details will be released tomorrow, July 18 on Linux community with the Linux patch guide."

(although the promised patch doesn't seem to have made an appearance, yet)
 
  • Like
Reactions: MrAverigeUser

TonyK

macrumors 65816
May 24, 2009
1,032
148
The Crucial M500, 480GB, SSD installed in my 2008 MP (3,1) is working just fine. Trim is enabled via 10.10.4's trimforce command.

It has been running 24/7 for several weeks and there have been no issues so far.

Have you looked for a firmware update for the MX200? When I first installed the M500 the MP would not see it. After finding and installing the latest firmware the MP found the SSD and it has worked without issue since (18 to 24 months).

Installed my Crucial MX200 1TB on my Macbook Pro 13" 2011. Everything run smoothly until I enabled TRIM. The computer stopped seeing my SDD... Finally managed to boot the system and see the SDD after a number of attempts. I disables TRIM and now everything seem back to normal. I guess I have a buggy SDD. I will wait until El Captain comes out before enabling TRIM again.

Just sharing my experience... I have no idea what the exact problem was/is.
 
  • Like
Reactions: Reason077

mactracker75

macrumors member
Apr 13, 2014
73
40
Astoria, Queens NY
Got a crucial MX 100 250 GB. Enabled TRIM, booted into single user mode to "trim" the drive, got some noticeable speed back and all is working very well. I'm not worried about the scary warning and if the drive does go down in flames, I've got Time Macine backups. Doubt it will though.
 

Soylent Yellow

macrumors member
Jun 4, 2014
64
92
Erm, technical knowledge challenged "Finally" crowd, for your consideration:
http://linux.slashdot.org/story/15/...linux-tread-cautiously-and-keep-backups-handy

I eagerly await your fists of rage flying into the air when your SSD that does a ****** job of implementing disk controller commands borks your data. (You see, Apple was cautious about this because they had the muscle to make hardware manufacturers do it right with Apple supplied parts. Good luck with your 840 EVO. The command comes with a disclaimer for a reason.)

Apparently the dreaded bug was not in the Samsung firmware, but in the Linux kernel: http://linux.slashdot.org/story/15/07/30/1814200/samsung-finds-fixes-bug-in-linux-trim-code

So, Samsung did a proper job writing software for the SSD drives and TRIM commands, and since we can assume that Apple did as well, we can all live happily ever after.
 
  • Like
Reactions: TonyK and Reason077

Tootall67

macrumors member
Sep 25, 2014
38
4
Portugal
Yesterday i installed a SSD on my Macbook Pro, i checked in system information, where it said "TRIM Support: Yes"

this was before i entered the command in terminal, sudo trimforce enable,

Does the "TRIM Support: Yes" mean the SSD supports Trim or does it mean TRIM is active ???
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.