OSX: it may not be a good idea to enable the ssd trim function.
A long time ago, since people started loading SSD to Mac machines and OSX began to support TRIM, people began to pay attention to enabling the TRIM function of OSX to optimize SSD performance, this is the slowest operation for SSD, especially when there are more and more junk data in the SSD, And the SSD needs to move these garbage to store useful data.
In the past, I never thought that opening TRIM would have any side effects on the system. Therefore, I do not understand how Apple only supports its own OEM SSD in OSX10.10. I have understood Apple's cautious attitude since I read a blog article.
It starts with learning that 10.10.4 has a built-in TRIM function that supports third-party SSD disks,
sudo trimfoce enable
Just looking at Apple's warning, I still had a little bit of disdain. I chose y without hesitation (why not? Finally, I can get rid of the third-party Trim Enabler software, you don't have to use the built-in functions of the Apple system. You can use the OSX system. I believe there are not many people doing this. I still remember that not long ago, OWC claimed that its Mercury series SDD adopts the SandForce core and does not use TRIM to automatically implement the garbage cleaning function. It is estimated that some people will be tempted by it.
Later, MacRumuors saw a message indicating "heed the data loss warning. Where did I find the original article about the Linux Server System Error Caused by Trim + SSD? Here: When Solid State Drives are not that solid. In their Linux server cluster, the most serious event is that the server goes down every other hour. They tried to update all related systems, troubleshooting checks logs of each related application from the application layer, file system, and system kernel, and asks the server provider if any hardware-related feedback is returned. They found that although the same type of servers only have a few hardware differences (including SSD), but some servers will go down again and use exclusion to replace the hardware servers, there is still no problem found. Later, it was found that the content blocks (B) of some small files in some systems were written to 0 by "random". They did not know who would clear these files, I guess it may be Trim. In the end, they shut down Trim. After several weeks of operation, the system no longer goes down. Then they contacted the supplier and Samsung. As a result, Samsung will conduct on-site debugging. If the problem cannot be solved, the machine will be transported to the Korean headquarters for further testing. No further messages have been sent so far.
According to their findings, by reading the latest Linux source code, the Linux system has a continuously updated Trim blacklist (of course, there are other brands of SSD and other problematic hard disks). The latest update is, all SSD disks of the Samsung 800 series are listed in this Blacklist, which indicates that they do not support NCQ Trim (there are several series of Misron and Crucial ). According to other people's reports about Samsung's customer service reply, Samsung's SSDS do not support the Queued Trim command, but Sequential Trim is safe. According to other people's explanation, no one has reported a similar problem in Windows because Windows prohibits SSD operations that do not support Queued Trim, or does not support Queued Trim operations, it is also a kind of non-real-time TRIM, a kind of planned centralized TRIM processing, and the details need to be clarified.
The execution of Sequential Trim significantly increases the SSD speed, because it needs to completely execute a TRIM command and then execute the next one. In this way, if the operating system performs TRIM operations every time a file is deleted, the performance of SSD varies depending on the speed of the SSD firmware. The Queued Trim released by the SATA 3.1 Standard solves the above problems. However, due to firmware issues, some SSDS may be confused when performing the Queued Trim operation.
However, it is reported that even the Sequential Trim may still have problems with some firmware SSDS.
The problem is not that simple. According to other reports, the firmware of these newer Samsung SSD versions fully supports the SATA 3.2 technical standard, but in fact, some of the features of this standard are not fully implemented. For example, the "RECEIVE/send fpdma queued" firmware is completely unsupported and claims to be fully supported. This causes the problem, once the upper-layer system uses this function, problems may occur, which is serious due to data loss. This problem exists in the previous model. Another possibility is that the SATA card has a certain defect and an error occurs when it is used in combination with SSD. This adds a level of uncertainty to the seemingly simple problem. However, it seems that all these SSDs are concentrated on the firmware itself, which may have some unknown technical defects.
The current situation is that the real-time TRIM function of the operating system is disabled and regular TRIM operations are performed, which will avoid the above problems as much as possible. Although this may cause temporary unavailability of the system, it is more secure.
Another point is that if TRIM is used in real time, the reply operation for accidentally deleting the file may not be able to proceed. Imagine that the deleted file is physically cleared in the SSD, as with traditional disks, the operating system only marks the deletion of files, so there is no way to recover files. Backups with traceable history are a feature that is more important than the disk age. Fortunately, the Time Machine supports version recovery, which is a good choice. I don't know whether the document version rollback function of OSX will be affected by Trim problems.
Therefore, it is a good idea to enable TRIM on a third-party SSD hardware uploaded to OSX. You can decide on your own.
In addition, Aerospike has developed an SSD open-source detection tool: ACT, which can also be considered for use.