An open community 
of Macintosh users,
for Macintosh users.

FineTunedMac Dashboard widget now available! Download Here

Topic Options
#11169 - 07/28/10 04:55 AM What is TRIM?
Pendragon Offline


Registered: 08/04/09
Loc: Georgetown, Texas, USA
What is TRIM and why is such a topic of passioned discussion?

I have tried researching it, but the sources I happen upon are all too technical for me.

Apparently, some (many?) are frustrated that the new iMacs do not have TRIM. So what's the big deal that I missing and is sure to lead me an Existentialist's fourth choice?

Your not too techy thoughts most appreciated.

_________________________
Harv
27" i7 iMac (10.13.6), iPhone Xs Max (12.1)

Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#11171 - 07/28/10 08:54 AM Re: What is TRIM? [Re: Pendragon]
grelber Offline


Registered: 08/05/09
Loc: North of 49th ||
Seems to me that tacit should've weighed in by now. Perhaps he has, and the topic is so technical that he's having difficulty distilling it into its non-techie essentials.
We can only hope. smile

Top
#11172 - 07/28/10 08:55 AM Re: What is TRIM? [Re: Pendragon]
alternaut Offline

Moderator

Registered: 08/04/09
Are you referring to the SSD command TRIM ? Additional info can be found in this MacRumors thread, and in the excellent AnandTech article linked to by the OP there.

Anyway, TRIM refers to a procedure to optimize writing to flash memory (see the paragraph ‘Flash drive specific issues’ in the Wikipedia link above). Since you can only write to empty memory cells, a time consuming data swap/erase/write cycle has to be followed on memory cells that store deleted data. If you could clear such old data before new write cycles, you could write data faster, and that’s what TRIM does.

The pro/con TRIM issue boils down to the difference in SSD performance (read/write speed) between TRIM supporting systems and those which don’t, and secondarily, perhaps, to the effect TRIM might have on the practical longevity of SSDs (which currently have a limited ‘write endurance’, as mentioned in the FTMF thread New HD died--thinking of SSD as replacement).

If I had an SSD wouldn’t worry if it didn’t have the benefit of TRIM, particularly if I would be satisfied with the SSD in general. Given the user comments on the issue I’ve come across, that seems the be the prevailing attitude.
_________________________
alternaut moderator

Top
#11179 - 07/28/10 11:11 AM Re: What is TRIM? [Re: alternaut]
Pendragon Offline


Registered: 08/04/09
Loc: Georgetown, Texas, USA
Originally Posted By: alternaut
Are you referring to the SSD command TRIM ? Additional info can be found in this MacRumors thread, and in the excellent AnandTech article linked to by the OP there.


Yes, that does seem to what I was referring to, but alas, even after reading the suggested links, I would hate to test on the issue, let alone explain it to others.


Edited by alternaut (07/28/10 12:25 PM)
Edit Reason: fixed quote tags
_________________________
Harv
27" i7 iMac (10.13.6), iPhone Xs Max (12.1)

Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#11181 - 07/28/10 12:03 PM Re: What is TRIM? [Re: Pendragon]
tacit Offline


Registered: 08/03/09
Loc: Portland, Oregon, USA
TRIM support is complicated because of some really peculiar ways in which flash-based drives (and thumb drives) work.

The short, quick, mostly technically correct rundown is this:

You can't write to just one byte of a flash memory device. Flash memory cells are grouped together in chunks. If you want to change just one byte on a Flash device, you have to re-write the whole entire chunk.

So in order to change one byte on a flash SSD or thumb drive, the computer has to read the whole chunk into memory, then change the one byte of the chunk, then write the whole chunk back out. That slows down writing significantly. When you add the fact that writing to a flash memory cell is slow to begin with compared to reading it, it takes quite a long time (relatively speaking) to store files on flash gadgets.

TRIM is a way to tell a flash SSD "This whole chunk of space is free sapce. It is not being used for anything. If I tell you to write one byte of data into this chunk, don't bother to read the whole chunk and then write it back out. I don't care if the rest of the chunk is erased when you write this one byte of information, because as far as I'm concerned this whole chunk is free space and I don't care what else is there."

In practice that means that writing is faster. Since it doesn't matter what else is in the chunk, the flash device doesn't have to read the whole chunk, change one byte, and write the whole chunk. It can write just the one byte. Doing that will erase the rest of that chunk, but that doesn't make any difference because that chunk is part of the empty space on the disk.

The down side to this is that normal disk unerase programs like Data Rescue can not reliably undelete files that have been deleted on a flash SSD. If you delete a file, then you write another file, and the other file is part of the same flash chunk as the deleted file (even if it ISN'T part of the same exact bytes), the deleted file will be erased. If oyu use TRIM on an SSD, it can become impossible for file recovery programs to recover accidentally deleted files.
_________________________
Photo gallery, all about me, and more: www.xeromag.com/franklin.html

Top
#11184 - 07/28/10 03:23 PM Re: What is TRIM? [Re: tacit]
Pendragon Offline


Registered: 08/04/09
Loc: Georgetown, Texas, USA
Many thanks Tacit for the explanation, though not all of what was said was fully comprehended. But moving on-

Since the pros and the cons of TRIM seem equal (or nearly so), and as there are no performance issues except for the most sophisticated, and even then, few would be of consequence in the real world, why the brouhaha?

Is this but a tempest in teacup, or should we all fester and rail until Apple finally provides/supports TRIM?

_________________________
Harv
27" i7 iMac (10.13.6), iPhone Xs Max (12.1)

Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#11194 - 07/29/10 08:25 AM Re: What is TRIM? [Re: Pendragon]
joemikeb Online
Moderator

Registered: 08/04/09
Loc: Fort Worth, Texas
Quote:
Is this but a tempest in teacup, or should we all fester and rail until Apple finally provides/supports TRIM?

IMHO this is a tempest in a teapot issue.

There have always been those users who bleat and moan because their computer is a nanosecond slower than someone else's computer when in reality only the most sophisticated testing can detect the difference and in "real world" use no one will ever notice. They are bleating and moaning over "bragging rights" not real world performance. I have no idea why Apple elected not to support TRIM, but I would bet it was because...
  1. design compromises elsewhere that implementing TRIM would have required were judged unacceptable
  2. At the time the design was finalized, remember Apple is always on the bleeding edge, it was deemed unwise
  3. The incremental performance increase of the entire system was deemed insufficient to warrant the time and cost for development.
  4. When the design was finalized the technology was not deemed sufficiently mature to adopt it.
  5. All of the above
  6. Some of the above
  7. None of the above (that should hedge all my bets)
_________________________
joemikeb • moderator

Top
#11246 - 07/31/10 10:01 PM Re: What is TRIM? [Re: grelber]
Virtual1 Offline


Registered: 08/04/09
Loc: Iowa
summarized another way, you can't write zeros to flash memory, you can only write 1's. If you want zeros you have to zero an entire block (which can be large) and then rewrite it. Sometimes the zeroing operation takes a significant time.

Basically all TRIM is doing is when you delete a file, it tells the hard drive it can zero the blocks that were used by the file. This makes the blocks around twice as fast to write to later, because they're already cleared.

Simplest analogy is a chalkboard. It's faster to write something on the board if you don't have to get out the eraser and erase it first. This just makes a habit of erasing parts of the board whenever possible, so when you need big chunk of space to use, it's already ready to go.
_________________________
I work for the Department of Redundancy Department

Top

Moderator:  alternaut, cyn