Linux kernel disables Samsung 860/870 SSD TRIM and NCQ
As early as 2019, users reported that there would be problems when using Samsung 860 Evo SATA SSD on Linux systems, but due to the small number of reports, this problem did not attract attention. The Samsung 870 Evo SATA SSD that was launched subsequently has the same problem. This problem is mainly related to the performance of the drive, and various abnormal locks and error messages may occur during use.
After two years of investigation, Linux engineers confirmed that there are some faults in the above-mentioned solid-state hard drives. As a countermeasure, the maintenance team in the latest version of Linux Kernel has banned the TRIM and NCQ functions of the above-mentioned solid-state disks through patches, both of which are used to optimize the drive.
According to the survey results, it has been determined that the Queued Trim command used by the SATA versions of Samsung 860 Evo and 870 Evo will cause failures of Intel, ASmedia, and Marvell SATA ACHI controllers, and such failures are more likely to occur on the ATI AMD ACHI platform.
The TRIM command allows the operating system to notify the solid-state drive which data is no longer in use and can be erased. After the data is sorted through the Trim command, the write speed of the solid-state drive can be improved. At present, almost all newly introduced solid-state hard drives support the TRIM command and are automatically turned on.
NCQ is a technology on SATA, which allows the system to optimize the queuing and movement of data according to the load for best performance. Both NCQ and TRIM are used to improve the performance of the drive. When it is turned on by default, compatibility failures may cause Linux users to encounter problems, such as the system stalls for 20 to 30 seconds during the startup phase.
It is worth noting that Samsung is somewhat ambiguous on this issue. Samsung seems to have disabled the Queued Trim function for all 800 series SSDs, but Samsung told the Linux Kernel maintenance team that there are no problems with models other than 840 and 850, but this time the repair is 860 and 870. In view of such problems, it is recommended that Linux users do not use all the hard drives of the Samsung 800 series, to avoid such failures that affect the use or cause performance degradation.