块不仅在您删除文件时被删除/未使用,而且在您执行更新某些元数据或将新数据写入文件等操作时也可能被删除/未使用。在每次删除块后发送 TRIM 命令会产生很多不必要的 IO 流量和开销。除了延迟修剪之外,还允许操作系统合并多个块以取消映射到单个命令中。因此,我不相信 Windows 在每次删除时都会这样做,尽管我无法完全验证这是否属实。我可以在 Windows 中看到重新修剪信息,但我不确定这只是一些奇怪的修剪措辞还是某种完整修剪或其他任何东西
PS C:\Users\> Get-EventLog -LogName Application -Message *trim* | select TimeWritten,Message
TimeWritten Message
----------- -------
06/10/2022 8:43:15 CH The storage optimizer successfully completed retrim on Data (D:)
06/10/2022 8:39:06 CH The storage optimizer successfully completed retrim on Windows 11 (C:)
28/09/2022 8:21:33 SA The storage optimizer successfully completed retrim on Data (D:)
28/09/2022 12:54:52 SA The storage optimizer successfully completed retrim on Windows 11 (C:)
21/09/2022 9:47:18 SA The storage optimizer successfully completed retrim on Data (D:)
21/09/2022 9:47:18 SA The storage optimizer successfully completed retrim on Windows 11 (C:)
21/09/2022 9:15:48 SA The storage optimizer successfully completed retrim on Data (D:)
20/09/2022 11:57:24 CH The storage optimizer successfully completed retrim on Windows 11 (C:)
15/09/2022 12:52:43 SA The storage optimizer successfully completed retrim on Data (D:)
15/09/2022 12:52:42 SA The storage optimizer successfully completed retrim on Windows 11 (C:)
08/09/2022 12:25:19 SA The storage optimizer successfully completed retrim on Windows 11 (C:)
01/09/2022 12:05:08 SA The storage optimizer successfully completed retrim on Data (D:)
01/09/2022 12:04:55 SA The storage optimizer successfully completed retrim on Windows 11 (C:)
24/08/2022 7:53:48 CH The storage optimizer successfully completed retrim on Data (D:)
24/08/2022 7:53:48 CH The storage optimizer successfully completed retrim on Windows 11 (C:)
17/08/2022 8:35:33 SA The storage optimizer successfully completed retrim on Data (D:)
17/08/2022 8:35:32 SA The storage optimizer successfully completed retrim on Windows 11 (C:)
13/08/2022 9:34:58 SA The storage optimizer successfully completed retrim on Data (D:)
13/08/2022 9:34:57 SA The storage optimizer successfully completed retrim on Windows 11 (C:)
10/08/2022 11:14:44 CH The storage optimizer successfully completed retrim on Windows 11 (C:)
03/08/2022 8:03:00 SA The storage optimizer successfully completed retrim on Data (D:)
03/08/2022 8:02:32 SA The storage optimizer successfully completed retrim on Windows 11 (C:)
27/07/2022 10:07:25 CH The storage optimizer successfully completed retrim on Data (D:)
27/07/2022 10:07:24 CH The storage optimizer successfully completed retrim on Windows 11 (C:)
21/07/2022 9:46:18 SA The storage optimizer successfully completed retrim on Data (D:)
21/07/2022 9:46:18 SA The storage optimizer successfully completed retrim on Windows 11 (C:)
13/07/2022 8:36:07 CH The storage optimizer successfully completed retrim on Data (D:)
13/07/2022 8:36:06 CH The storage optimizer successfully completed retrim on Windows 11 (C:)
12/07/2022 11:14:47 CH The storage optimizer successfully completed retrim on Data (D:)
12/07/2022 11:14:46 CH The storage optimizer successfully completed retrim on Windows 11 (C:)
30/06/2022 10:14:20 SA The storage optimizer successfully completed retrim on Data (D:)
30/06/2022 10:10:56 SA The storage optimizer successfully completed retrim on Windows 11 (C:)
块不仅在您删除文件时被删除/未使用,而且在您执行更新某些元数据或将新数据写入文件等操作时也可能被删除/未使用。在每次删除块后发送 TRIM 命令会产生很多不必要的 IO 流量和开销。除了延迟修剪之外,还允许操作系统合并多个块以取消映射到单个命令中。因此,我不相信 Windows 在每次删除时都会这样做,尽管我无法完全验证这是否属实。我可以在 Windows 中看到重新修剪信息,但我不确定这只是一些奇怪的修剪措辞还是某种完整修剪或其他任何东西
要检查最后一次重整,您可以打开碎片整理程序,它会根据需要通过碎片整理和修剪来优化磁盘
您还可以从 Windows 事件日志中查看完整的重修历史记录
如您所见,有时重修之间只有 1 天,但有时 10 天或 2 周。有时只修剪 1 个驱动器,但有时会修剪 2 个。Windows 将自动确定需要修剪多少
您还可以运行
Optimize-Volume -DriveLetter C -ReTrim
以强制手动重新修剪另请参阅windows 和 mac 多久运行一次 trim 命令,因此删除的文件何时会变得不可恢复?