บทความนี้สอนตรวจสอบว่า TRIM เปิดอยู่บน Windows 11/10/8/7 PC หรือไม่ และวิธี disable/enable TRIM support ใน Windows 11/10 เพื่อให้ SSD หรือ Solid State Drives ทำงานที่ประสิทธิภาพสูงสุด
Windows มี improved Storage Optimizer ตอน detect ว่า volume mounted on SSD จะส่ง TRIM hints ชุดเต็มสำหรับ volume ทั้งหมดอีกครั้ง ทำใน idle time ช่วย SSD ที่ clean up ไม่ได้ก่อนได้โอกาส react hints ทำ cleanup และ optimize สำหรับ best performance
ถ้าไม่รู้ TRIM คือ storage level hint NTFS ส่งสำหรับ normal inline operations เช่น "deletefile" NTFS ส่ง trim hints ตอนไฟล์ถูกลบ/ย้ายจาก regions นั้น SSDs consume hints ทำ cleanup ใน background เรียกว่า 'reclaim' ช่วยพร้อมสำหรับ next writes
สรุป TRIM (introduced in Windows 7) คือการสื่อสารกับ SSDs เกี่ยวกับ sectors ที่ไม่ต้องการแล้ว
วิธีตรวจสอบ TRIM เปิดอยู่ใน Windows?
จาก WinX Menu เปิด Command Prompt (Admin) พิมพ์ Enter:
fsutil behavior query DisableDeleteNotify

ถ้าเห็น 0 = TRIM enabled ไม่ต้องทำอะไร ถ้าได้ 1 = TRIM disabled ต้อง enable
อาจเห็นผลลัพธ์แบบนี้:

NTFS DisableDeleteNotify = 0 (Disabled) > Means > TRIM support enabled for SSDs with NTFS
ReFS DisableDeleteNotify = 0 (Disabled) > Means > TRIM support enabled for SSDs with ReFS
NTFS DisableDeleteNotify = 1 (Enabled) > Means > TRIM support disabled for SSDs with NTFS
ReFS DisableDeleteNotify = 1 (Enabled) > Means > TRIM support disabled for SSDs with ReFS
NTFS DisableDeleteNotify is not currently set > Means > TRIM support for SSDs with NTFS not currently set, but will auto enable if SSD with NTFS connected
ReFS DisableDeleteNotify is not currently set > Means > TRIM support for SSDs with ReFS not currently set, but will auto enable if SSD with ReFS connected
วิธีเปิดใช้งาน TRIM ใน Windows 11/10
ใน CMD window พิมพ์ Enter:
fsutil behavior set DisableDeleteNotify 0
วิธีปิด TRIM
ถ้าต้องการปิด TRIM ใช้คำสั่ง:
fsutil behavior set DisableDeleteNotify 1
ควรทราบว่า TRIM ทำงานได้ก็ต่อเมื่อ Solid State Drive รองรับบน Windows 11/10/8/7
