在过去的几年里,固态硬盘越来越受欢迎。您也可能已经阅读或至少听到其他(heard someone)人谈论SSD(固态硬盘(Solid State Drive))与传统硬盘相比有多快。如果您已经在使用 SSD,或者您想购买SSD来提高计算机的性能,您应该知道TRIM 支持(TRIM support)是必不可少的。什么是SSD TRIM,为什么它对SSD(SSDs)很重要,以及如何在Windows中检查它是否已打开?您可以在本指南中找到这些问题的答案:
SSD 驱动器的 TRIM 是什么?
TRIM是一个命令,借助该命令,操作系统(operating system)可以告诉固态驱动器(state drive)( SSD ) 哪些数据块不再需要并且可以删除,或者标记为可以重写。换句话说,TRIM是一个命令,可帮助操作系统(operating system)准确了解您要移动或删除的数据的存储位置。这样,固态驱动器(state drive)只能访问保存数据的块。此外,每当用户或(Furthermore)操作系统(operating system)发出删除命令时,TRIM 命令(TRIM command)立即擦除存储文件的页面或块。这意味着下次操作系统(operating system)尝试在该区域写入新数据时,不必先等待将其删除。
让我们深入探讨一下这个概念:要了解TRIM是什么以及它的作用,您首先需要了解SSD 的工作原理(SSDs work)以及它们如何处理存储在其中的信息。
固态硬盘只不过是一个装满闪存芯片的设备。操作系统(operating system)需要能够读取和操作这些芯片上的数据。为此,SSD必须有办法安排这些数据。存储在SSD上的信息被划分为数据块。这些块又被划分为数据页。为了更好地举例说明,假设SSD是一个库。图书馆有很多书架,这些书架上摆满了书。
但是,当您不再想保留其中一本书时会发生什么?假设(Say)您想将其出售或借给朋友。很明显,您只需将书从那个架子上拿出来。好吧,如果您的库是固态驱动器,那么事情就不会那样工作。在SSD上,如果您决定删除一些数据,那么它是否只占用一个块中的一个页面也没关系。整个街区都需要被移除!其他页面上的所有信息将移动到临时缓冲存储器中(buffer memory),然后放回原始块中。每当您想取出一本书或用新书替换它时,这就像从您的图书馆清空整个书架一样。然后,您将不得不将所有其他书籍放回原处。效率不高!
总而言之,要让固态驱动器(state drive)在先前占用的空间上写入新数据,它首先必须完全擦除它。每次移动或删除SSD上的数据时都这样做会降低数据写入速度的性能。
为什么 TRIM 对 SSD 驱动器有用?
您现在已经知道,在删除和重写数据时,不使用TRIM的固态(TRIM)驱动器(state drive)必须部分移动重要信息,清除包含它的所有块,最后将新数据写入那些块。一方面,这意味着设备的性能很差。另一方面,这意味着SSD进行了大量的擦除和重写。这些都会堆积起来,导致SSD(SSD)内部的闪存芯片快速磨损。
TRIM通过消除不断擦除和重写大块内存的需要,确保防止这两个问题。启用TRIM的(TRIM)SSD可以与称为页面的较小内存集群一起工作,而不是管理整个块。更重要的是,每当操作系统(operating system)或用户发出删除命令时, SSD都会自动发送TRIM命令(TRIM command)来擦除正在擦除的存储空间(storage space)。当新数据存储在该区域时,这确保了更快的写入速度。
如何检查Windows是否为您的 SSD开启了TRIM
如果您想检查您的固态驱动器上的(state drive)TRIM是启用还是禁用,您必须使用命令提示符(Command Prompt)。启动它的一种快速方法是使用搜索。我们在本指南中展示了许多其他方法:在Windows中启动(Windows)命令提示符(Command Prompt)的 10 种方法。
然后,在命令提示符(Command Prompt)窗口中,键入以下命令: fsutil behavior query disabledeletenotify。
按键盘上的Enter 键(Enter),片刻之后,命令提示符(Command Prompt)会显示一条消息,其中包含以下两个选项之一:
-
"NTFS DisableDeleteNotify = 0" - 表示您的 SSD 上启用了 TRIM 功能。(enabled)
-
"NTFS DisableDeleteNotify = 1" - 表示您的 SSD 上禁用了 TRIM 功能。(disabled)
注意:(NOTE:)您可能已经注意到,在我们运行在Windows 10上的(Windows 10)测试 PC(test PC)上,上述命令(above command)还发出了另一个响应:“ReFS DisableDeleteNotify 当前未设置。” ("ReFS DisableDeleteNotify is not currently set.")这没什么好担心的,这意味着如果您连接使用ReFS的(ReFS)SSD , TRIM 功能(TRIM feature)会自动启用。ReFS也称为Resilient File System,是Microsoft 专有的(Microsoft proprietary)文件系统,在(file system)Windows 家用(Windows home)PC上不常用。您可以在Wikipedia(Wikipedia)上阅读有关它的更多信息。
如何在 Windows 中启用 SSD TRIM
如果您在Windows PC上运行用于查看(Windows PC)TRIM是否启用的命令,并且发现它已禁用,则可能需要将其打开。为此,您必须以管理员身份打开命令提示符(Command Prompt),输入以下命令:fsutil behavior set disabledeletenotify 0,然后按键盘上的Enter 。
如果您收到消息"NTFS DisableDeleteNotify = 0",则表示您的SSD上已启用TRIM。
如何在 Windows 中禁用 SSD TRIM
尽管没有理由这样做,但如果您想在Windows PC上禁用(Windows PC)TRIM,您也可以这样做。以管理员身份打开命令提示符(Command Prompt),输入命令:fsutil behavior set disabledeletenotify 1,然后按键盘上的Enter 。
如果您收到消息"NTFS DisableDeleteNotify = 1",则表示您的SSD上已禁用TRIM。
TRIM是否打开了您的SSD?你有什么SSD?
固态驱动器提供了很多性能。在读取或写入速度方面,它们比传统硬盘快得多。但是,由于它们处理数据的方式,SSD(SSDs)必须使用特定的固件命令来防止过度磨损和性能下降(wear and performance degradation)。现在您知道为什么TRIM必不可少以及它的作用,所以我们很好奇:您的SSD上是否启用了TRIM?你有什么SSD?它是负担得起的还是游戏玩家超快的模型(superfast model)?在评论部分发表评论,让我们(section and let)讨论。
What is SSD TRIM, why is it useful, and how to check whether it is turned on
In the last couple of years, solid state drives have increasіngly gаined popularity. It iѕ also prоbable that you have read or at least heard someone else talking about how fast an SSD (Solid State Drive) is compared to traditional hard driveѕ. If you are already using one or you want to buy аn SSD to improve your computer's performance, уou should know that TRIM support іs essеntіal. What is SSD TRIM, why does it matter fоr SSDs, and how do you check whether it is turned on, in Windows? You can fіnd the answers to these questions, in this guide:
What is TRIM for SSD drives?
TRIM is a command with the help of which the operating system can tell the solid state drive (SSD) which data blocks are no longer needed and can be deleted, or are marked as free for rewriting. In other words, TRIM is a command that helps the operating system know precisely where the data that you want to move or delete is stored. That way, the solid state drive can access only the blocks holding the data. Furthermore, whenever a delete command is issued by the user or the operating system, the TRIM command immediately wipes the pages or blocks where the files are stored. This means that the next time the operating system tries to write new data in that area, it does not have to wait first to delete it.
Let's dig a bit further into this notion: to understand what TRIM is and what it does you first need to know how SSDs work and how they handle the information stored on them.
A solid-state drive is nothing more than a device full of flash memory chips. The operating system needs to be able to read and manipulate the data on these chips. To do that, the SSD has to have a way to arrange this data. Information stored on an SSD is divided into blocks of data. These blocks are, in turn, divided into pages of data. To better exemplify, imagine that the SSD is a library. The library has lots of shelves, and these shelves are filled with books.
However, what happens when you no longer want to keep one of these books? Say you want to sell it or lend it to a friend. It would seem obvious that you only have to take the book out of that shelf. Well, if your library is a solid-state drive, things would not work that way. On an SSD, if you decide to delete some data, it would not matter if it only occupies a page from a block. The whole block would need to be removed! All the information on the other pages would move to a temporary buffer memory, then be put back on the original block. It is like emptying a whole shelf from your library whenever you want to take a book out or replace it with a new one. Then, you would have to put all the other books back in their places. It is not efficient!
To conclude, for a solid state drive to write new data on a previously occupied space, it first has to wipe it completely. Doing it every time you move or delete data on your SSD translates into reduced performance for data writing speeds.
Why is TRIM useful for SSD drives?
You already know by now that when deleting and rewriting data, a solid state drive that does not use TRIM has to partially move significant pieces of information, wipe out all the block(s) containing it and, finally, write the new data onto those blocks. On the one hand, this means that the device's performance is poor. On the other hand, it means that the SSD does lots of erasing and rewriting. These all pile up and cause fast wear of the flash memory chips that are found inside the SSD.
TRIM ensures that both these issues are prevented, by eliminating the need to erase and rewrite large chunks of memory continually. Instead of managing whole blocks, a TRIM enabled SSD can work with the smaller memory clusters called pages. Even more, whenever a delete command is issued by the operating system or the user, the SSD automatically sends a TRIM command to wipe the storage space being erased. This ensures a faster writing speed when new data is stored in that area.
How to check whether Windows has turned on TRIM for your SSD
If you want to check whether TRIM is enabled or disabled on your solid state drive, you have to use the Command Prompt. A quick way to launch it is to use the search. There are also many other methods, which we have shown in this guide: 10 ways to launch the Command Prompt in Windows.
Then, in the Command Prompt window, type this command: fsutil behavior query disabledeletenotify.
Press Enter on your keyboard and, after a short while, Command Prompt displays a message that contains one of these two options:
-
"NTFS DisableDeleteNotify = 0" - means that the TRIM feature is enabled on your SSD.
-
"NTFS DisableDeleteNotify = 1" - means that the TRIM feature is disabled on your SSD.
NOTE: You might have noticed that on our test PC, which runs on Windows 10, the above command also issued another response: "ReFS DisableDeleteNotify is not currently set." This is nothing to worry about and means that the TRIM feature is automatically enabled if you connect an SSD that uses ReFS. ReFS, also known as Resilient File System, is a Microsoft proprietary file system that is not commonly used on Windows home PCs. You can read more about it on Wikipedia.
How to enable SSD TRIM in Windows
If you run the command for finding out whether TRIM is enabled or not on your Windows PC, and you found that it is disabled, you might want to turn it on. To do so, you have to open Command Prompt as administrator, enter this command: fsutil behavior set disabledeletenotify 0, and press Enter on your keyboard.
If you get the message "NTFS DisableDeleteNotify = 0", it means that TRIM has been enabled on your SSD.
How to disable SSD TRIM in Windows
Although there are no reasons for doing this, in case you want to disable TRIM on your Windows PC, you can do that too. Open Command Prompt as administrator, enter the command: fsutil behavior set disabledeletenotify 1, and press Enter on your keyboard.
If you get the message "NTFS DisableDeleteNotify = 1", it means that TRIM has been disabled on your SSD.
Is TRIM turned on your SSD? What SSD do you have?
Solid state drives offer lots of performance. When it comes to their read or write speeds, they are much faster than traditional hard drives. However, because of the way they work with data, SSDs must use specific firmware commands to prevent excessive wear and performance degradation. Now you know why TRIM is essential and what it does, so we are curious: is TRIM enabled on your SSD? What SSD do you have? Is it an affordable one or is it a gamer superfast model? Leave a comment in the comments section and let's discuss.