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

serkan

macrumors 6502
Original poster
May 14, 2012
427
69
Menlo Park,California
Hey ;

I have enabled TRIM by entering sudo trim force enable in to the Terminal.

But I have to disable it because I happen to not recognise any change in performance , which suppose to be.

By any chance anybody knows how to disable TRIM with Terminal ?

Thank
 
Hey ;

I have enabled TRIM by entering sudo trim force enable in to the Terminal.

But I have to disable it because I happen to not recognise any change in performance , which suppose to be.

By any chance anybody knows how to disable TRIM with Terminal ?

Thank

What do you mean, change in performance? What kind of performance gains do you expect? Trim is useful to reduce disk wear and keep write operations speedy. It’s more preventive, really.

You can use the same command to disable it:
Code:
sudo trimforce disable

I think you might need to disable System Integrity Protection first though.
 
What do you mean, change in performance? What kind of performance gains do you expect? Trim is useful to reduce disk wear and keep write operations speedy. It’s more preventive, really.

You can use the same command to disable it:
Code:
sudo trimforce disable

I think you might need to disable System Integrity Protection first though.

Thank , problem solved :)
 
What do you mean, change in performance? What kind of performance gains do you expect? Trim is useful to reduce disk wear and keep write operations speedy. It’s more preventive, really.
TRIM is only meant to keep write performance near what it was when it was new. It is NOT meant nor does it do anything to reduce disk wear. TRIM might cause less disk wear than GC (the other technology that does the same thing as TRIM, only via a different way) due to a reduced amount of p/e cycles but it doesn't reduce disk wear. The technology that reduces disk wear is called "wear levelling".

I think you might need to disable System Integrity Protection first though.
Using tools like trimforce doesn't require disabling rootless nor SIP since it is part of the system. SIP is meant to prevent things that malware do like injecting code. Things you don't want it to do. It would be rather silly if Apple includes a tool they don't want to work ;)

@serkan: trimforce only has 3 options: enable, disable and help so it is really easy to use :) In general you don't notice differences between GC, TRIM and none of them. You'll only notice it when you delete lots of stuff and try to write something to disk. Over time you'll notice that this will be slower than when you bought the drive/computer. GC and TRIM try to prevent that situation. Neither of them are meant to increase the performance of an ssd at all times.
 
  • Like
Reactions: JamesPDX
TRIM is only meant to keep write performance near what it was when it was new. It is NOT meant nor does it do anything to reduce disk wear. TRIM might cause less disk wear than GC (the other technology that does the same thing as TRIM, only via a different way) due to a reduced amount of p/e cycles but it doesn't reduce disk wear. The technology that reduces disk wear is called "wear levelling".
It was my understanding that TRIM reduces the number of write operations that would otherwise be necessary if it were not enabled, even with garbage collection. With a slower depletion of disk writes, it would follow that the drive can be held in shape for longer, hence less ‘disk wear’ with TRIM. Ultimately, though, it’s not a feature you turn on for an immediate gain of performance, as we both agree.

Using tools like trimforce doesn't require disabling rootless nor SIP since it is part of the system. SIP is meant to prevent things that malware do like injecting code. Things you don't want it to do. It would be rather silly if Apple includes a tool they don't want to work ;)

Actually, it does require turning off SIP temporarily in this case, at least it was required in earlier versions. Trimforce is not documented so far and we don’t know what Apple is going to do with it. Apple warns that forcing trim may lead to data loss on some hardware, so perhaps there is a case to be made that it should be a feature that the user or a program cannot turn on with one simple command, not even with sudo. But that’s pretty much conjecture at this point.
 
Last edited:
TRIM and GC will erase the contents of memory cells that have data that is no longer needed (aka deleted data). GC does this via an algorithm. The simplest way is to compare it to doing a defragmentation: it will shift data around. TRIM, when it works like it should, will only clear out the cells that contain the data that is deleted. Unfortunately there are some variations in TRIM implementations but in general because of the way TRIM works you end up with less wear compared to GC. However, since TRIM is doing an erase cycle it will cause wear.

As for trimforce, I used it today with 10.11 pb1 and sudo plus a reboot was all I needed to turn it on. It most likely was a bug in older builds that has been fixed now.
 
  • Like
Reactions: crjackson2134
It was my understanding that TRIM reduces the number of write operations that would otherwise be necessary if it were not enabled, even with garbage collection. With a slower depletion of disk writes, it would follow that the drive can be held in shape for longer, hence less ‘disk wear’ with TRIM. Ultimately, though, it’s not a feature you turn on for an immediate gain of performance, as we both agree.



Actually, it does require turning off SIP temporarily in this case, at least it was required in earlier versions. Trimforce is not documented so far and we don’t know what Apple is going to do with it. Apple warns that forcing trim may lead to data loss on some hardware, so perhaps there is a case to be made that it should be a feature that the user or a program cannot turn on with one simple command, not even with sudo. But that’s pretty much conjecture at this point.
You don't need to turn off SIP, in order to use the "enforce trim" command.
 
  • Like
Reactions: crjackson2134
Hey ;

I have enabled TRIM by entering sudo trim force enable in to the Terminal.

But I have to disable it because I happen to not recognise any change in performance , which suppose to be.

By any chance anybody knows how to disable TRIM with Terminal ?

Thank

Keep TRIM on.

This article explain why : http://arstechnica.com/gadgets/2015...garbage-collection-so-i-dont-need-trim-right/

But to summarize it :

Garbage collection isn't another way to do the same thing that TRIM do on a SSD (even if peoples mistakenly talk about TRIM and GC as competing technologies), actually TRIM make Garbage Collection more efficient. Having TRIM on on a SSD is always a good thing.

Basically, TRIM tell the SSD (which do garbage collection) what files are actually deleted by the OS. Without TRIM, the SSD have no way to tell the difference between the big 4 GB movie you saved in your folder, and the 4 GB movie you deleted a while ago. Since the OS doesn't physically delete files, but simply keep note to "himself" that this space can be written on if need be, on the SSD level, those big chunk of date are like any other chunk, and the SSD cannot do proper garbage collection of this chunk of space to be efficient when this space will be needed for something else.

Also, TRIM doesn't give you a "performance boost", but simply help a lot to make sure that the performance you had at first will remain.
 
Keep TRIM on.

This article explain why : http://arstechnica.com/gadgets/2015...garbage-collection-so-i-dont-need-trim-right/

But to summarize it :

Garbage collection isn't another way to do the same thing that TRIM do on a SSD (even if peoples mistakenly talk about TRIM and GC as competing technologies), actually TRIM make Garbage Collection more efficient. Having TRIM on on a SSD is always a good thing.

Basically, TRIM tell the SSD (which do garbage collection) what files are actually deleted by the OS. Without TRIM, the SSD have no way to tell the difference between the big 4 GB movie you saved in your folder, and the 4 GB movie you deleted a while ago. Since the OS doesn't physically delete files, but simply keep note to "himself" that this space can be written on if need be, on the SSD level, those big chunk of date are like any other chunk, and the SSD cannot do proper garbage collection of this chunk of space to be efficient when this space will be needed for something else.

Also, TRIM doesn't give you a "performance boost", but simply help a lot to make sure that the performance you had at first will remain.

It's a good read, thanks for that. However, it isn't always good to enable TRIM in this case. Some Samsung drives, for instance, are known to delete wrong data when the TRIM command is issued. Trimforce doesn't verify whether your SSD works reliably with the command, hence the lengthy warning when attempting to enable trimforce. Caution is still sensible.
 
Keep TRIM on.

This article explain why : http://arstechnica.com/gadgets/2015...garbage-collection-so-i-dont-need-trim-right/

But to summarize it :

Garbage collection isn't another way to do the same thing that TRIM do on a SSD (even if peoples mistakenly talk about TRIM and GC as competing technologies), actually TRIM make Garbage Collection more efficient. Having TRIM on on a SSD is always a good thing.
Then you clearly haven't understood the article! The article also starts out that TRIM isn't a requirement, it only helps. That should be a big hint already. It then tells why we have TRIM and GC: to prevent performance loss with writes due to cells still having data that is no longer needed. The only thing that is different is how they do it. The article goes on to explain the differences and stresses that TRIM does this far more efficiently because it actually knows what to clear whereas GC does some smart guessing.

At the bottom of the article this is repeated:
So, always use TRIM if you can. It will make your SSD’s garbage collection work a lot better. But if you find yourself in a situation where TRIM isn’t available, don’t panic—it’s nice to have, but it isn’t a requirement.

Also, TRIM doesn't give you a "performance boost", but simply help a lot to make sure that the performance you had at first will remain.
Due to being more efficient it can cause less p/e cycles than GC and thus cause less wear. In the end it doesn't really matter which of the two you use for the majority of SSDs. Some GC implementations are crap, some TRIM implementations are crap. Only in those cases it matters if you use GC or TRIM. It's also the reason why there have been dataloss issues on Linux, why OS X didn't support TRIM on non-Apple SSDs and why trimforce has this big warning when enabling TRIM. If you want TRIM then do some homework and find out if your SSD has a proper TRIM implementation that won't cause issues.
 
Then you clearly haven't understood the article! The article also starts out that TRIM isn't a requirement, it only helps. That should be a big hint already. It then tells why we have TRIM and GC: to prevent performance loss with writes due to cells still having data that is no longer needed. The only thing that is different is how they do it. The article goes on to explain the differences and stresses that TRIM does this far more efficiently because it actually knows what to clear whereas GC does some smart guessing.

At the bottom of the article this is repeated:



Due to being more efficient it can cause less p/e cycles than GC and thus cause less wear. In the end it doesn't really matter which of the two you use for the majority of SSDs. Some GC implementations are crap, some TRIM implementations are crap. Only in those cases it matters if you use GC or TRIM. It's also the reason why there have been dataloss issues on Linux, why OS X didn't support TRIM on non-Apple SSDs and why trimforce has this big warning when enabling TRIM. If you want TRIM then do some homework and find out if your SSD has a proper TRIM implementation that won't cause issues.

I never said to try to activate TRIM at all cost. It's just that the OP is looking for a way to turn it off for a reason that doesn't really make sense (Not seeing a gain in performance). So in this context I just told him to keep it on.
 
I never said to try to activate TRIM at all cost. It's just that the OP is looking for a way to turn it off for a reason that doesn't really make sense (Not seeing a gain in performance). So in this context I just told him to keep it on.

I agree. My view on Trim is this:

If it's disabled and cannot be enabled, don't worry about it; it's not a problem to use an SSD without Trim.

If it's disabled and would require a security tradeoff to enable it as some versions of OS X do, don't bother. It's not worth it.

If it's disabled and you have a drive that has known issues with it, or have already experienced data loss as some have with Linux, then definitely leave it off.

If Trim can be enabled easily with no ill effects, then go for it.

If your SSD has no built in garbage collection and Trim can be easily enabled, do it.

If Trim is already enabled and there are no problems, then leave it on.

This goes for any OS, whether it's OS X, *BSD, Windows, Linux, or anything else.
 
If Trim can be enabled easily with no ill effects, then go for it.
That's the problem. You don't know if it'll have no ill effects. We've seen it with Linux and Windows: there are some SSDs out there that have issues with their TRIM implementation causing all sorts of problems like data corruption and even dataloss. Apple didn't put a warning in trimforce to scare people, it did that because it knows these problems but doesn't know what SSD you are using. Since there isn't any list with good and bad SSDs when it comes to TRIM you are simply taking a gamble with your data. Remember that when using a backup you can transfer corrupted data. In such cases you can restore all you want but the data is lost.

Why enable something where you have no idea what it'll do in the long run which doesn't even bring you any added value when compared to what any SSD does by default (aka GC)? The only reason people are enabling it is they read or heard that you should do it which leads to replies like this:

I never said to try to activate TRIM at all cost. It's just that the OP is looking for a way to turn it off for a reason that doesn't really make sense (Not seeing a gain in performance). So in this context I just told him to keep it on.

Note the complete absence of why it is better than leaving things at their defaults and why you should take the risk that Apple is warning about. People are going frantic about TRIM and they have no idea why at all: "why should I enable it?", "oh because", "why?", "because", "why?", "it's better than GC", "how so?", "because, it's just better"). It's not "trying to activate at all cost", it's "following the herd blindly" which is even worse. Doing things blindly is what gets your computer infected with malware, hacked or messed up in another way. At least try to understand what things are and don't just blindly enable something just because someone says it is better.

The famous "if it ain't broken, don't fix it" applies here.
 
That's the problem. You don't know if it'll have no ill effects. We've seen it with Linux and Windows: there are some SSDs out there that have issues with their TRIM implementation causing all sorts of problems like data corruption and even dataloss. Apple didn't put a warning in trimforce to scare people, it did that because it knows these problems but doesn't know what SSD you are using. Since there isn't any list with good and bad SSDs when it comes to TRIM you are simply taking a gamble with your data. Remember that when using a backup you can transfer corrupted data. In such cases you can restore all you want but the data is lost.

Why enable something where you have no idea what it'll do in the long run which doesn't even bring you any added value when compared to what any SSD does by default (aka GC)? The only reason people are enabling it is they read or heard that you should do it which leads to replies like this:



Note the complete absence of why it is better than leaving things at their defaults and why you should take the risk that Apple is warning about. People are going frantic about TRIM and they have no idea why at all: "why should I enable it?", "oh because", "why?", "because", "why?", "it's better than GC", "how so?", "because, it's just better"). It's not "trying to activate at all cost", it's "following the herd blindly" which is even worse. Doing things blindly is what gets your computer infected with malware, hacked or messed up in another way. At least try to understand what things are and don't just blindly enable something just because someone says it is better.

The famous "if it ain't broken, don't fix it" applies here.

This is probably why Apple was slow to allow the ability to enable trim natively for third party SSD in OS X. I can hear the complaints from people when their data gets corrupted or lost, that OS X was responsible for doing it.
 
Last edited:
  • Like
Reactions: Weaselboy
^^^^I have four Samsung SSDs on two Velocity Duo x2s. Have been running Trim since the the release of Trim Enabler. On 10.10.4 I enabled Trim with the trimforce enable command. I am now running 10.11 with Trim still enabled. No issues with any of my four SSDs.

Lou
 
Exactly, OP's computer is now working normally with TRIM enabled, DON'T FIX IT!
Well, the thing about TRIM is that the failure mode is subtle: you could be perfectly happy for months until you try to open a photo one day and the file turns out to be full of zeroes instead of your precious data.

There's so much superstition about how TRIM works (and so much anger that I'll probably regret wading in), but it's very simple: the TRIM command is a way for the operating system to tell an SSD that it no longer cares about a block of data.

Discarding data is obviously an inherently dangerous thing for a storage device to do, which is why TRIM is disabled by default on third-party SSDs and why you should do some research before you enable it.

What could possibly go wrong? Well, the OS or SSD firmware could be buggy and discard the wrong block. There could be subtle interactions; an SSD could have a TRIM bug that only manifests after a certain sequence of commands which happens to be more common on a certain OS (or OS version). Either way, silent data loss that you may not notice for months or years. Yay!

TL;DR: TRIM is not magic. You should know what you're doing before you enable it.

(Me? I enabled it on my Crucial C300 seconds after learning about trimforce, of course :D).
 
  • Like
Reactions: KALLT
Exactly, OP's computer is now working normally with TRIM enabled, DON'T FIX IT!
TRIM isn't enabled by default so you already tried to fix a problem that wasn't there by enabling it ;) By disabling it you are returning to the era where you didn't fix it.

Again, we don't know if it'll have no ill effects by disabling TRIM now. So, leave it on.
Incorrect. We never had TRIM support with 3rd party SSDs before on Macs. On all of these SSDs TRIM was never enabled. The only thing that changed is that previously you had to resort to a 3rd party tool to enable it and now you can do it in OS X. In both cases there is still no support at all so that hasn't changed.
So in other words, we've had experience with GC for years now (since 2008 when the first consumer SSDs arrived) while we have had less experience with TRIM (it came to existence somewhere in late 2009/2010) and almost none in OS X (10.10.4 hasn't been out that long). As eyvind explains defects can occur after months. We simply haven't had that much time so no matter how high you can jump: you cannot possibly have any idea if there will be ill effects or not after using trimforce.

Again, the warning is there because we've seen SSDs with crappy TRIM implementations causing all sorts of issues. If you want to check out trimforce then do so on a test machine. We simply don't have any info on how well/crappy trimforce works yet. It's too soon.
 
By disabling it you are returning to the era where you didn't fix it.....We simply don't have any info on how well/crappy trimforce works yet. It's too soon.

So, you have info about a SSD that already has TRIM enabled can safely return to the previous state without any problem? Where is the info?

If we know such little about TRIM, and TRIM is so danger. It will be equally (or even more) danger to disable it now, because we may accidentally stop some TRIM progress that is not finished yet, and cause trouble.

P.S. Obviously I am not arguing about TRIM is good or bad, but just playing a logic game, please don't be angry. I am just doing this for fun, not trying to make you angry :p
 
Last edited:
Yes, because TRIM is nothing but a command in the ATA spec ;) Disabling TRIM means that the OS won't sent this command any more and thus rely upon GC solely.

Btw, try not to play games like these; people get confused and it's not helping someone who has an issue and wants to resolve it.
 
I've been using Trim successfully since my first SSD. I now have an Apple/Samsung PCIe SSD for boot that OS X enabled trim without my intervention or use of 3rd party apps.

I also have 3rd party SSDs installed (Samsung 840 Pro) that I have filled to capacity on a couple of occasions while Trim was enabled for that drive. I've never had an issue and the drive has been used very heavily. I have 2 TM backups and 2 uncompressed copies of data on 2 more magnetic drives. If mine craps out in the next 5 minutes, it will take me only a few minutes to recover. I've read a lot of the available information and in MY OPINION there is no danger in using Trim for MOST people. If you're sporting an older SSD drive and/or drive firmware, you MIGHT have a problem. If you are booting a Linux drive on an older SSD, you MIGHT have a problem. There is so much hyperbole regarding Trim and it's alleged dangers that people are really confused. If you're (not you specifically) that worried about the Trim apocalypse then by all means avoid it. It's been all good for me, but I always have contingencies and if the Trim apocalypse strikes my drive down, I won't lose a byte...
 
  • Like
Reactions: Weaselboy
And how about the most common failure: a soft fail after a few weeks/months? How do you manage that (and make sure your backup doesn't contain corrupted data)?
 
And how about the most common failure: a soft fail after a few weeks/months? How do you manage that (and make sure your backup doesn't contain corrupted data)?

I've never had a "soft fail" but, all of my most critical data is also backed up on optical media. I may have to forgo a few days worth of non-critical data but it's not a problem for me. Especially since I've never had a "soft fail" so far, even over a period of years.

You can always find a scenario whereby data will be lost, but most of them have nothing to do with Trim. It sounds like you are terribly concerned and fear the use of the Trim command. You should probably steer clear of it for peace of mind.

You know, it's kind of like driving a car. Something can always go wrong, but if you wear your safety belt and have working air bags, pay attention and drive carefully you're most likely going to be okay. However, if you drive into the path of a train, or an 18 wheeler, or if an air plane come crashing into your car from the sky... Well you'll have a problem. I know this to be true, yet I feel relatively safe driving to the store or work. However, if I were terrified every time I got into the car, I'd stay home and try to avoid cars at all costs.

Computers fail, computer parts fail, data gets lost and corrupted every day, and all without the help of the Trim command. This Trim issue mostly FUD mixed with some truths that tend to give people pause. There was a time when this concern was very valid, and there are situations right now where Trim could be a bad thing for a particular use case. We could play the "what if?" game all day long about any number of things. The fact is that most people are perfectly safe enabling Trim and keeping decent backups of critical data just in case.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.