ssd trim_如何检查是否为您的SSD启用了TRIM(如果未启用,则启用它)

ssd trim

ssd trim

img_5748ca6e9ce94

Windows 7 and above are set to automatically enable TRIM on solid-state drives. You shouldn’t need to worry about enabling TRIM yourself. But, if you want to double-check that Windows has enabled TRIM, you can.

Windows 7及更高版本设置为在固态驱动器上自动启用TRIM。 您无需担心自己启用TRIM。 但是,如果您要仔细检查Windows是否已启用TRIM,则可以。

When TRIM is enabled, Windows will send an instruction to your solid-state drive every time you delete a file. The solid-state drive can then automatically erase that file’s contents. This is important for maintaining speedy solid-state drive performance.

启用TRIM后,每次删除文件时Windows都会向固态驱动器发送一条指令。 然后,固态驱动器可以自动擦除该文件的内容。 这对于保持高速固态驱动器性能非常重要。

如何检查TRIM是否启用 (How to Check if TRIM Is Enabled)

You’ll need to check this from an Administrator Command Prompt window. To open an Administrator Command Prompt window on Windows 10 or 8.1, right-click the Start button and select “Command Prompt (Admin).”

您需要从“管理员命令提示符”窗口中进行检查。 要在Windows 10或8.1上打开管理员命令提示符窗口,请右键单击开始按钮,然后选择“命令提示符(管理员)”。

On Windows 7, open the Start menu, search for “Command Prompt”, right-click the “Command Prompt” shortcut, and select “Run as Administrator.”

在Windows 7上,打开“开始”菜单,搜索“命令提示符”,右键单击“命令提示符”快捷方式,然后选择“以管理员身份运行”。

Run the following command in the Command Prompt window:

在“命令提示符”窗口中运行以下命令:

fsutil behavior query DisableDeleteNotify

You’ll see one of two results. If you see DisableDeleteNotify = 0 , TRIM is enabled. Everything is good and you don’t need to worry about it. (This is a little confusing at first glance—with a value of 0, the DisableDeleteNotify option is disabled. That’s a double negative, which means “DeleteNotify,” also known as TRIM, is enabled.)

您将看到两个结果之一。 如果看到DisableDeleteNotify = 0 ,则启用TRIM。 一切都很好,您无需担心。 (乍看之下,这有点令人困惑-值为0时,DisableDeleteNotify选项被禁用。这是一个双负数,表示启用了“ DeleteNotify”,也称为TRIM。)

If you see DisableDeleteNotify = 1 , TRIM is disabled. This is a problem if you have an SSD.

如果看到DisableDeleteNotify = 1 ,则禁用TRIM。 如果您有SSD,这是一个问题。

如何启用TRIM (How to Enable TRIM)

Windows should automatically enable TRIM if you have a modern version of Windows with a modern solid-state drive. If TRIM is disabled, it’s possible that Windows knows something you don’t, and TRIM shouldn’t be enabled for a drive. Perhaps it’s a a very old solid-state drive. However, it’s also possible that TRIM really should be enabled but something messed up in the automatic detection process.

如果您具有带有现代固态驱动器的现代Windows版本,则Windows应自动启用TRIM。 如果禁用了TRIM,则Windows可能知道您不了解的内容,并且不应为驱动器启用TRIM。 也许这是一个非常古老的固态驱动器。 但是,也有可能确实应启用了TRIM,但是在自动检测过程中有些混乱。

If TRIM isn’t enabled and you’d like to enable it, you can forcibly do so by running the following command in an Administrator Command Prompt window:

如果未启用TRIM,而您想启用它,则可以通过在“管理员命令提示符”窗口中运行以下命令来强制启用:

fsutil behavior set DisableDeleteNotify 0

(If you’d like to disable TRIM afterwards for some reason, run the above command with a 1 in place of the 0 .)

(如果出于某种原因之后想要禁用TRIM,请使用1代替0运行上述命令。)

如何检查Windows是否按计划运行重试 (How to Check if Windows Is Running Retrim on a Schedule)

On Windows 8 and 10, Windows automatically optimizes solid-state drives on a schedule by running the “retrim” operation. This is necessary because, if many TRIM requests are sent to a drive at once, the requests may build up in a queue and then be discarded. Windows regularly performs “retrim” optimizations that ensure all the TRIM requests sent to a drive are in fact processed. You can read more about this on Microsoft employee Scott Hanselman’s blog.

在Windows 8和10上,Windows通过运行“ retrim”操作自动按计划优化固态驱动器。 这是必要的,因为如果立即将许多TRIM请求发送到驱动器,则这些请求可能会在队列中累积,然后被丢弃。 Windows会定期执行“优化”优化,以确保发送给驱动器的所有TRIM请求均得到处理。 您可以在Microsoft员工Scott Hanselman的博客上了解有关此内容的更多信息

The “retrim” feature is only included in Windows 8 and 10, so Windows 7 users don’t need to worry about this.

“ retrim”功能仅包含在Windows 8和10中,因此Windows 7用户无需为此担心。

To check that Windows is performing retrim optimizations on a schedule, open the Optimize Drives application. Open the Start menu, search for “Optimize Drives”, and click the “Defragment and Optimize Drives” shortcut.

要检查Windows是否正在按计划执行刷新优化,请打开“优化驱动器”应用程序。 打开开始菜单,搜索“优化驱动器”,然后单击“碎片整理和优化驱动器”快捷方式。

Click the “Change Settings” button and ensure “Run on a Schedule (Recommended)” is enabled. By default, Windows will run the retrim optimization on a weekly schedule.

单击“更改设置”按钮,并确保启用“按计划运行(推荐)”。 默认情况下,Windows将每周运行一次retrim优化。



Again, this isn’t something you should need to worry about. If your computer has an SSD, Windows should automatically enable TRIM and enable optimizing the drive with retrim on a schedule. These options should just be enabled by default. But it’s worth giving a quick look to make sure everything’s running properly.

同样,这不是您应该担心的事情。 如果您的计算机具有SSD,则Windows应自动启用TRIM并按计划使用retrim优化驱动器。 默认情况下应启用这些选项。 但是值得快速浏览一下以确保一切正常运行。

翻译自: https://www.howtogeek.com/257196/how-to-check-if-trim-is-enabled-for-your-ssd-and-enable-it-if-it-isnt/

ssd trim

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Linux的SSD TRIM是一种用于优化固态硬盘(SSD)性能和寿命的技术。TRIM是一项操作系统级别的指令,用于通知SSD哪些数据块不再被使用,可以被擦除和重写。这有助于提高SSD的写入性能,并减少因为重写使用数据块而引起的性能下降。 要启用SSD TRIM功能,您需要进行以下步骤: 1. 确保您的SSD支持TRIM。大多数现代SSD都支持这个功能,但一些较旧或低端的SSD可能不支持。您可以查看SSD制造商的文档或技术规格来确认它是否支持TRIM。 2. 检查您的Linux发行版是否启用TRIM。大多数现代Linux发行版默认情况下已启用TRIM。您可以运行以下命令来检查: ``` sudo systemctl status fstrim.timer ``` 如果输出显示"active"或"enabled",则表示TRIM启用。 3. 确保您的文件系统支持TRIM。大多数常见的文件系统,如ext4和XFS,都支持TRIM。您可以通过检查`/etc/fstab`文件中的文件系统挂载选项来确认是否启用TRIM。 例如,对于ext4文件系统,您应该看到类似于以下内容的挂载选项: ``` UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx / ext4 discard,noatime,errors=remount-ro 0 1 ``` 请注意,`discard`选项用于启用TRIM。 4. 手动运行TRIM命令。如果TRIM没有自动运行,您可以手动运行TRIM命令来清理使用的数据块。使用以下命令: ``` sudo fstrim -av ``` 这将触发对所有已挂载文件系统的TRIM操作。 请谨慎使用TRIM命令,因为它会触发SSD上的擦除操作,可能会导致数据丢失。确保在运行TRIM之前备份重要数据。 希望这些信息对您有所帮助!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值