An open community 
of Macintosh users,
for Macintosh users.

FineTunedMac Dashboard widget now available! Download Here

Previous Thread
Next Thread
Print Thread
What is TRIM?
#11169 07/28/10 11:55 AM
Joined: Aug 2009
OP Offline

Joined: Aug 2009
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
Re: What is TRIM?
Pendragon #11171 07/28/10 03:54 PM
Joined: Aug 2009
Likes: 4
Offline

Joined: Aug 2009
Likes: 4
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

Re: What is TRIM?
Pendragon #11172 07/28/10 03:55 PM
Joined: Aug 2009
Likes: 1
Moderator
Offline
Moderator

Joined: Aug 2009
Likes: 1
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
Re: What is TRIM?
alternaut #11179 07/28/10 06:11 PM
Joined: Aug 2009
OP Offline

Joined: Aug 2009
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.

Last edited by alternaut; 07/28/10 07:25 PM. 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
Re: What is TRIM?
Pendragon #11181 07/28/10 07:03 PM
Joined: Aug 2009
Likes: 1
Offline

Joined: Aug 2009
Likes: 1
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
Re: What is TRIM?
tacit #11184 07/28/10 10:23 PM
Joined: Aug 2009
OP Offline

Joined: Aug 2009
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
Re: What is TRIM?
Pendragon #11194 07/29/10 03:25 PM
Joined: Aug 2009
Likes: 16
Moderator
Offline
Moderator

Joined: Aug 2009
Likes: 16
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)


If we knew what it was we were doing, it wouldn't be called research, would it?

— Albert Einstein
Re: What is TRIM?
grelber #11246 08/01/10 05:01 AM
Joined: Aug 2009
Offline

Joined: Aug 2009
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

Moderated by  alternaut, cyn 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.4.33 Page Time: 0.026s Queries: 30 (0.019s) Memory: 0.6102 MB (Peak: 0.6951 MB) Data Comp: Zlib Server Time: 2024-03-28 11:36:12 UTC
Valid HTML 5 and Valid CSS