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

TonyK

macrumors 65816
May 24, 2009
1,032
148
Well last night I disabled Trim Enabler as I contemplate moving to Yosemite. The Crucial M500 drive is supposed to have Active Garbage collection which runs when the computer is idle.

Since my system is on 24/7 and not used when I sleep or am at work there will be plenty of time for the AG to work. My drives never power down and the system is set to never sleep (because of an issue with a different video board a few years back).

Will take a Time Machine backup plus a Chronosync backup and then probably pull the trigger in the next few days.
 

newellj

macrumors G3
Oct 15, 2014
8,127
3,030
East of Eden
I've given up on TRIM, and do this instead:

dd if=/dev/zero of=trim.tmp bs=1024 count=10241024
rm trim.tmp

Which writes zeros to all empty parts of the file system, until the disk fills up.
This is the same technique used by recent Linux distributions to avoid the performance penalties and risks of TRIM.

If the underlying sectors are already zero, this will execute very fast.
It will leave a large pool of zeroed out sectors that the SSD firmware can quickly overwrite.

This is something that should be run periodically, rather than just once? Any guesses how often, for a drive in the 256-512GB range with "normal" (whatever that means) home use?
 

Apple_Robert

Contributor
Sep 21, 2012
34,401
49,855
In the middle of several books.
It's a new software, written from scratch, so it will not be a free upgrade. But Trim Enabler users with a license will get a very reasonable upgrade discount, to make the transition fair.



That SSD is too old, it does not support Trim.

Will the new release of Trim Enabler come with an uninstall that returns kext signing to its original state in Yosemite?
 

Cindori

macrumors 68040
Jan 17, 2008
3,527
378
Sweden
Will the new release of Trim Enabler come with an uninstall that returns kext signing to its original state in Yosemite?

There is already a feature like that. When you flip the switch back to Off, Trim Enabler will ask you if it should re-enable kext signing.

For the new software, I am also working on an automated recovery tool. But it might not be included in the initial release, but in a later update.
 

Apple_Robert

Contributor
Sep 21, 2012
34,401
49,855
In the middle of several books.
There is already a feature like that. When you flip the switch back to Off, Trim Enabler will ask you if it should re-enable kext signing.

For the new software, I am also working on an automated recovery tool. But it might not be included in the initial release, but in a later update.

Thank you for the reply. I will make sure to let those I mentioned previously know about this (re: new upcoming versioning).

I really like Trim Enabler. It is easy to use, without having to worry about making sure one has a lot of different settings right before it will work like it is supposed to.
 

JamesPDX

Suspended
Aug 26, 2014
1,056
495
USA
Briefly-ish

Does Yosemite support the TRIM command for non-Apple SSDs?

In a word, No.

If you forget to disable Cindori's Trim Enabler before you fool around with RAM slots or you reset your PRAM, you've got a real PITA.

http://www.cindori.org/trim-enabler-and-yosemite/

That's the on deal-killer for me in switching from 10.9.x to 10.10.x. -I almost forgot about this issue because I've got Pro Tools 11.3, FCPX, LPX, LR4, and PS CS6 working great on an external spinner.
 

TonyK

macrumors 65816
May 24, 2009
1,032
148
It is the TRIM issue that has kept me from upgrading to Yosemite as well. Everything I have works fine on Mt. Lion and there was no compelling reason to change.

Looking forward to the new tool though.
 

Badagri

macrumors 6502a
Aug 9, 2012
500
78
UK
In a word, No.

If you forget to disable Cindori's Trim Enabler before you fool around with RAM slots or you reset your PRAM, you've got a real PITA.

http://www.cindori.org/trim-enabler-and-yosemite/

That's the on deal-killer for me in switching from 10.9.x to 10.10.x. -I almost forgot about this issue because I've got Pro Tools 11.3, FCPX, LPX, LR4, and PS CS6 working great on an external spinner.

New ram/change slots has no effect on PRAM being cleared. I've installed new ram/order of ram of slots and nothing changed.
 

dkotanid

macrumors newbie
Jul 16, 2010
16
0
Greece
what's the point? a simple PRAM reset would accomplish that
I just did a pram reset on 10.10.2 PB with trim enabler (cindori) enabled and kext disabled of course and i booted normal without having any issue or reenabling that kext drivers.
 

h9826790

macrumors P6
Apr 3, 2014
16,614
8,546
Hong Kong
I just did a pram reset on 10.10.2 PB with trim enabler (cindori) enabled and kext disabled of course and i booted normal without having any issue or reenabling that kext drivers.

Cindori use quite a few different approach to make that happen. However, it's not 100% guarantee. You may do a PRAM reset with TRIM enabled with no drama, but someone else may get into a no boot situation. Therefore, this action is not recommended.
 

dkotanid

macrumors newbie
Jul 16, 2010
16
0
Greece
Cindori use quite a few different approach to make that happen. However, it's not 100% guarantee. You may do a PRAM reset with TRIM enabled with no drama, but someone else may get into a no boot situation. Therefore, this action is not recommended.
Ok thanx. I installed last month all the os x version beginning with 10.6 ,10.8,10.9 and now 10.10. I have a bug on all of them except 10.6. Mission control on all of them is laggy. In 10.8 - 10.9 it happens sometimes when i use much full screen apps, but in 10.10 it is so annoying. It happens everytime. I have 12GB ram, 256 SSD Samsung Pro 840, iMac mid 2010 i3 3.06GHz and ATi 4670. I can't fine what's is causing this problem. In 10.10.2 really its a big problem!
 

Cindori

macrumors 68040
Jan 17, 2008
3,527
378
Sweden
You can go to System Preferences->Accessibility->Increase Contrast
for a less laggy Mission Control.
It's a bug/performance issue in Yosemite, and has nothing to do with Trim Enabler.
 

dkotanid

macrumors newbie
Jul 16, 2010
16
0
Greece
You can go to System Preferences->Accessibility->Increase Contrast
for a less laggy Mission Control.
It's a bug/performance issue in Yosemite, and has nothing to do with Trim Enabler.
Ok thank you cindori and for your nice work...When we can expect the update?
 

Ethosik

Contributor
Oct 21, 2009
7,813
6,715
Oh and for those who are wondering why Windows still does defrag when you have an ssd, here is some more info about it: The real and complete story - Does Windows defragment your SSD? In short: it does because of the filesystem.

That is not a good article, and I have seen it posted numerous places which just causes confusion. It does not perform a defrag on the drive, it is not possible. That article did not mention wear leveling. It certainly does something to SSDs, but it does not defrag them like HDDs.

When you defrag a standard hard drive, it makes all data sequential due to having a moving head and spinning drive. It is a massive performance hit to have it spin and move to get various parts of the data, and making the data as sequential as possible improves the performance.

This is not a problem on SSDs. Cell block A has the same access time as Cell block B.

We actually want....yes we want a fragmented SSD. That ensures that all cells get even use (wear leveling). Sometimes, on some SSDs, it can help performance too since data can be accessed simultaneously when they are on different flash dies.

TRIM ensures that deleted content on a cell is marked as writable again immediately. Otherwise, there is some overhead to write data to that cell again.
 

h9826790

macrumors P6
Apr 3, 2014
16,614
8,546
Hong Kong
This is not a problem on SSDs. Cell block A has the same access time as Cell block B.

We actually want....yes we want a fragmented SSD. That ensures that all cells get even use (wear leveling). Sometimes, on some SSDs, it can help performance too since data can be accessed simultaneously when they are on different flash dies.

This has been discussed in many place. Theory and test show that fragmentation do affect file reading performance even though with SSD.

It's not as simple as the SSD can read 2 cells at the same time, but it will require 2 reading request from the OS, which actually suffer more from other latency by that extra request. At least, I've only seen test to prove this fact, but never saw any test shows that fragmentation can improvement performance.

In general, minor fragmentation only cause very small performance degradation, which is almost negligible on SSD. However, serious fragmentation will definitely reduce reading performance even on a modern SSD, even though the SSD itself can finish the reading action by no time, it still suffer from other latency (OS, CPU, RAM, etc). This is why the OS will try to keep fragmentation under certain level.
 

Ethosik

Contributor
Oct 21, 2009
7,813
6,715
This has been discussed in many place. Theory and test show that fragmentation do affect file reading performance even though with SSD.

It's not as simple as the SSD can read 2 cells at the same time, but it will require 2 reading request from the OS, which actually suffer more from other latency by that extra request. At least, I've only seen test to prove this fact, but never saw any test shows that fragmentation can improvement performance.

In general, minor fragmentation only cause very small performance degradation, which is almost negligible on SSD. However, serious fragmentation will definitely reduce reading performance even on a modern SSD, even though the SSD itself can finish the reading action by no time, it still suffer from other latency (OS, CPU, RAM, etc). This is why the OS will try to keep fragmentation under certain level.

It is not the SSD at fault here, it is the OS, CPU, RAM, and other things. There is still wear leveling to ensure all cells get used equally. And how exactly is having the OS keep fragmentation low possible? Like I said, they did not mention wear leveling AT ALL in that article. If you can avoid wear leveling to defrag the drive, why can't we avoid wear leveling and write zeroes on the drive?

I thought DoD wiping a SSD was impossible because of wear leveling. How can it get defragged then?

The physical drive cannot be defragged, so it is just a file system thing. Like I said, that article is not very good. It caused a lot of confusion. It does NOT defrag the DRIVE.
 
Last edited:

Cindori

macrumors 68040
Jan 17, 2008
3,527
378
Sweden
Ok thank you cindori and for your nice work...When we can expect the update?

teaser1.png
 

dyn

macrumors 68030
Aug 8, 2009
2,708
388
.nl
When you defrag a standard hard drive, it makes all data sequential due to having a moving head and spinning drive. It is a massive performance hit to have it spin and move to get various parts of the data, and making the data as sequential as possible improves the performance.

This is not a problem on SSDs. Cell block A has the same access time as Cell block B.
Then you completely misunderstood the article. The problem isn't the ssd nor the hdd, the problem is the filesystem. Fragmentation has a bad effect on the filesystem which is why Windows is running a defrag. You could argue that the article at times simplifies it a bit too much.

We actually want....yes we want a fragmented SSD.
Actually we don't. There are little benefits to it and most of them are unnoticeable.

That ensures that all cells get even use (wear leveling).
No it does not do that at all. Not even remotely or in a wild fantasy. Data is written to available cells. It is not the filesystem, OS, data, fragmentation, etc. that decide where the data is going. The ssd itself does that and yes, it will be influenced by the wear levelling mechanism.

TRIM ensures that deleted content on a cell is marked as writable again immediately. Otherwise, there is some overhead to write data to that cell again.
That's not what TRIM does. When you delete data the OS will order the drive to do that. An hdd simply marks the parts of the drive that contained the data as "reusable". An ssd does the same thing. This causes a problem when you want to reuse the cell because it first has to be cleared out before you can write anything to it. This additional step causes a slow down when writing. They solved it by using a very simple solution: immediately clear out the cell or use an algorithm to clear out all cells marked as "reusable". That way the only step will be writing data to the cell. If you look at it realistically it you'll see that they didn't solve anything, they only moved the problem (now deleting takes longer because it has that additional step). Clearing out the cell is inevitable.

TRIM is an addition to that. It's a command in the ATA spec telling the ssd to not mark the cells as reusable but to clear them out.

It is not the SSD at fault here, it is the OS, CPU, RAM, and other things.
You mean the filesystem.

There is still wear leveling to ensure all cells get used equally.
Which has got absolutely nothing to do with it.

And how exactly is having the OS keep fragmentation low possible? Like I said, they did not mention wear leveling AT ALL in that article. If you can avoid wear leveling to defrag the drive, why can't we avoid wear leveling and write zeroes on the drive?
The very simple reason why they didn't mention wear levelling: IT HAS GOT NOTHING TO DO WITH IT!!! What's with the wear levelling obsession?!

This is about how the filesystem uses addressing. Take a look at something like inodes. You can only have a certain number of them. When you hit that limit you get lots of errors (quite simply: no more inodes means no more storing of any data). The drive has got nothing to do with that nor any of the technology that the drive uses. And that's the entire point of the article: the drive has got nothing to do with it thus it will treat any drive the exact same way.

Or in other words: because the drive has nothing to do with it, the defragmentation will be enabled for ALL drives. The only thing that changes is the frequency. On an ordinary hdd there are other problems with fragmentation which requires frequently running a defrag. An ssd does not have those issues so you don't have to defrag frequently.

I thought DoD wiping a SSD was impossible because of wear leveling. How can it get defragged then?
The problem lies with how NAND behaves.

Like I said, that article is not very good. It caused a lot of confusion. It does NOT defrag the DRIVE.
The article is fine, your interpretation and knowledge of things isn't and is more likely the reason why you find it confusing. The article is trying to make you see that there are two things at play: the drive and the filesystem. The reason for the Windows defrag is number 2: the filesystem.
 

Ethosik

Contributor
Oct 21, 2009
7,813
6,715
Then you completely misunderstood the article. The problem isn't the ssd nor the hdd, the problem is the filesystem. Fragmentation has a bad effect on the filesystem which is why Windows is running a defrag. You could argue that the article at times simplifies it a bit too much.


Actually we don't. There are little benefits to it and most of them are unnoticeable.


No it does not do that at all. Not even remotely or in a wild fantasy. Data is written to available cells. It is not the filesystem, OS, data, fragmentation, etc. that decide where the data is going. The ssd itself does that and yes, it will be influenced by the wear levelling mechanism.


That's not what TRIM does. When you delete data the OS will order the drive to do that. An hdd simply marks the parts of the drive that contained the data as "reusable". An ssd does the same thing. This causes a problem when you want to reuse the cell because it first has to be cleared out before you can write anything to it. This additional step causes a slow down when writing. They solved it by using a very simple solution: immediately clear out the cell or use an algorithm to clear out all cells marked as "reusable". That way the only step will be writing data to the cell. If you look at it realistically it you'll see that they didn't solve anything, they only moved the problem (now deleting takes longer because it has that additional step). Clearing out the cell is inevitable.

TRIM is an addition to that. It's a command in the ATA spec telling the ssd to not mark the cells as reusable but to clear them out.


You mean the filesystem.


Which has got absolutely nothing to do with it.


The very simple reason why they didn't mention wear levelling: IT HAS GOT NOTHING TO DO WITH IT!!! What's with the wear levelling obsession?!

This is about how the filesystem uses addressing. Take a look at something like inodes. You can only have a certain number of them. When you hit that limit you get lots of errors (quite simply: no more inodes means no more storing of any data). The drive has got nothing to do with that nor any of the technology that the drive uses. And that's the entire point of the article: the drive has got nothing to do with it thus it will treat any drive the exact same way.

Or in other words: because the drive has nothing to do with it, the defragmentation will be enabled for ALL drives. The only thing that changes is the frequency. On an ordinary hdd there are other problems with fragmentation which requires frequently running a defrag. An ssd does not have those issues so you don't have to defrag frequently.


The problem lies with how NAND behaves.


The article is fine, your interpretation and knowledge of things isn't and is more likely the reason why you find it confusing. The article is trying to make you see that there are two things at play: the drive and the filesystem. The reason for the Windows defrag is number 2: the filesystem.

Yes, I know what TRIM does, I just said a simple way of saying it.

Therefore, I was right. It does not defrag the DRIVE just the file system. That was my entire argument.

A lot of people got confused with this article, not just me. There are a few times it just says "simply: yes Windows does defrag your SSD). No, that is completely false. It defrags the FILE SYSTEM, not the DRIVE.

Why the hell does everybody keep saying I am obsessed about wear leveling. Defragging a HDD moves data around to be sequential right? Wear leveling is a perfect argument because it CAN'T make data sequential on the SSD.

And yes, wear leveling basically does fragment the data. If I get a 500GB SSD, and only use 100GB of it, am I ONLY using 1/5 of the drive EVER? The other 4/5 of the drive's cells are NEVER being used? Wear leveling makes it so I use all my drive equally. So yes, the data is fragmented (not on sequential cells). Just like a heavily fragmented HDD means data is not sequential.

If I get a 500GB drive and write x number of petabytes on it, are only the first few cells only being used? No, all cells are being used.

You know, I could say the same thing about you guys. "What is with the TRIM obsession?". I am talking about wear leveling because somebody brought up an article about SSD defragging. Wear leveling is part of that discussion. So what exactly, you discuss something in a few posts and all of the sudden you are obsessed with it? I am so sorry for discussing something. Is wear leveling like a curse word on here or something? Geez. Nice attitude.
 
Last edited:

dyn

macrumors 68030
Aug 8, 2009
2,708
388
.nl
Yes, I know what TRIM does, I just said a simple way of saying it.

Therefore, I was right. It does not defrag the DRIVE just the file system. That was my entire argument.
No you are plain wrong. TRIM has nothing to do with defragmentation whatsoever. It only tells the ssd to clear certain NAND cells which is completely different than a defrag where data is moved around so it is not all over the place but neatly ordered on the drive (both ssd and hdd).

A lot of people got confused with this article, not just me. There are a few times it just says "simply: yes Windows does defrag your SSD). No, that is completely false. It defrags the FILE SYSTEM, not the DRIVE.
No it is completely correct. Defragmentation is done on the hardware layer thus the drive, not the filesystem. The only thing that is different is the reason for doing the defragmentation. Normally you'd do that to increase performance due to the way a hdd works. It's just not the only reason why you'd do a defrag and that is what the article is trying to explain. A fragmented filesystem causes all sorts of problems.

Why the hell does everybody keep saying I am obsessed about wear leveling. Defragging a HDD moves data around to be sequential right? Wear leveling is a perfect argument because it CAN'T make data sequential on the SSD.
Because you mention it just about everywhere no matter if it makes sense or has anything to do with it or not. Wear levelling on an ssd is done via an algorithm at write time to make sure that each cell gets an equal amount of writes. Defragmentation is all about grouping files. This fixes a couple of problems like not having enough inodes and a slowdown of disk speed (read and write).

And yes, wear leveling basically does fragment the data. If I get a 500GB SSD, and only use 100GB of it, am I ONLY using 1/5 of the drive EVER? The other 4/5 of the drive's cells are NEVER being used? Wear leveling makes it so I use all my drive equally. So yes, the data is fragmented (not on sequential cells). Just like a heavily fragmented HDD means data is not sequential.
You really need to research what wear levelling is because the above shows that you have absolutely no idea what it is at all. There is nothing correct about your description of wear levelling!

What wear levelling does is make sure that cells are written to equally but it isn't very strict. It can't be because you also have data on the drive that just stays there. Those cells can't be written and thus not all cells will be written to equally. The ssd might have NAND cells but there is much more to it than just that. Fragmentation means that parts of files are everywhere and pages/sectors aren't filled up efficiently. What defragmentation does is grouping those pieces of files together and also fill those pages/sectors as efficiently as possible. In case of an ssd there could very well be different levels of fragmentation (at filesystem level which is what is being discussed in the article but also at NAND cell level) but one should definitely not mix them up.

If I get a 500GB drive and write x number of petabytes on it, are only the first few cells only being used? No, all cells are being used.
No, not all cells are being used. Only those that are available (some are dead like bad sectors, some are already in use, some have already had a lot of writes, etc.).

You know, I could say the same thing about you guys. "What is with the TRIM obsession?".
Same here since every ssd out there has garbage collection by default which works about as good as TRIM does.

I am talking about wear leveling because somebody brought up an article about SSD defragging. Wear leveling is part of that discussion.
It is definitely not part of that discussion because, again, it has absolutely nothing to do with it. Bringing up carrots would be the same thing. Yet you keep going on about wear levelling as if your life depends on it.

Geez. Nice attitude.
You start flaming an article with complete misinformation. That's name calling. Talking about having a "nice attitude"...

Anandtech has some old but relevant articles about how an ssd works. They'll show you exactly how files are stored on an ssd. Very nice read and illustrative pictures.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.