The term TRIM or TRIM support always comes to mind when it comes to the use of SSDs, ie storage media, which, in contrast to mechanical hard disks, do not consist of spinning magnetic disks, but of flash memory cells. And that’s where the problem starts.
Magnetic Disc vs. Flash Memory Cell
Let’s start with the old-fashioned hard drive: when we delete a file, not the actual data gets deleted, just the reference in the table of contents. This has the advantage of being much faster: Just the note “Program XY” is deleted and not the whole maybe 800 MB. The actual data is still on the disk and will not be overwritten until something else is saved – because this area is available according to the table of contents. This is also the reason why data recovery programs can recover “deleted” data: in most cases, only the table of contents, ie the list of data, is deleted, not the data itself.
This system works because in principle the magnetic disks can be overwritten indefinitely and it does not matter if the same area is used constantly. In addition, the data can be overwritten directly and must not be deleted first.
This is different with a SSD, however: it consists of individual memory chips, which in turn consist of individual cells. These cells can only be written in for a limited cycles, depending on the type (quality) a few thousand times. If you treated the SSD like a hard drive, some areas would be used very often and others would not. This would wear out certain areas of the SSD quickly. Therefore one tries to distribute the write accesses on the SSD always evenly over all memory cells, so that the wear is distributed over the entire memory space. For this, the controller of the SSD is responsible, which knows exactly where which data are and which cells should be overwritten and which should be used. All this is not necessary for mechanical hard drives.
The second important point regarding a SSD is the fact that memory cells, in contrast to the magnetic disk of the hard disk, must be deleted before rewriting. It even gets more complicated: Although the memory cells of an SSD can be written on individually, the deletion always affects many memory cells simultaneously, so-called blocks. As we already know, every write, and thus erasure, places a burden on the memory cells, which reduces their lifetime. If you have to delete a memory cell to write new data, you have to delete the entire block in which it is located. Even if all other memory cells are empty, they all have to go through this deletion process.
Operating System vs. SSD Controller
So how does the SSD controller optimize best? It waits a bit until we delete other data and combines a little back and forth. Part of the concept is that there is a bit of extra space on the SSD that can be used for copying. The controller wants to delete all the cells that should be deleted only once, if possible. So after it knows which data can be deleted and which ones need to persist, it takes them and copies them to a free space and then deletes the rest – the entire block. This feature is called garbage collection.
This approach is not bad, but has one drawback: There is a difference between what the OS knows and what the SSD controller knows. If we delete a photo, the operating system knows “Photo A is deleted” – but does not pass on this knowledge to the SSD. If we now save photo B, the operating system thinks “Ah, no problem, that fits where previously photo A was, write it please, SSD”. The SSD is now surprised, because it had not heard of Photo A being deleted. It has to place photo B somewhere else and mark photo A as deleted, so to speak, it is one step behind.
This is where TRIM comes in: The operating system passes the deletion information directly to the SSD so that it knows which data is already invalid and does not even consider the already deleted information in its internal organization and restructuring for deleting blocks. Remember, the controller does more work than a hard drive, because the SSD actually always needs to clear the data. Thus, superfluous data is no longer copied back and forth which has a positive effect on the life and also on the speed.
No Trim! What to do now?
A good question. Apple does not provide TRIM support for retrofitted SSDs. Even for externally connected Thunderbolt SSD drives TRIM is not available.
So what can you do to keep the SSD performing? You have to be careful to buy a SSD with good garbage collection. So if the SSD does not get any TRIM information from the operating system and needs to take care of everything, then this particular feature must be very strong.
In our experience, Plextor SSDs without TRIM are very clear and can keep their performance well. Samsung EVO 840 SSDs we tested, however, suffer a serious drop in speed without TRIM. This is not a sign of a bad product – with TRIM they are permanently extremely fast. It just shows that you have to pay close attention to which SSD you use in the Apple universe.
Update: Apple is now supporting TRIM for internal third party SSDs. Perfect.