How do I determine whether my SSD (Samsung UM41) supports the TRIM command?

6,487

Solution 1

Newish releases of hdparm should report you something like this if TRIM is supported:

*Data Set Management TRIM supported

You can try hdparm -I /dev/yourssd.

Kernel has supported TRIM from version 2.6.28 and at least ext4 supports TRIM.

Solution 2

Ubuntu 10.04, like almost any recent Linux, supports TRIM. I believe this support is at the kernel level, so the only reason Ubuntu would not be using TRIM would be if you have compiled a custom kernel specifically removing (or making a module that is being unused) certain SATA abilities. Therefore, your OS supports it and will use TRIM unless something is preventing it from doing so.

Also, from the Samsung website:

All Samsung branded consumer solid state drives offer TRIM support.

The only other thing to look for is that your SSD should be using AHCI. To check this, you should enter your BIOS setup. Usually you do this by pressing F1, F2, or DEL when you first turn on the computer, but it varies. Then look around and make sure the SATA mode is either AHCI or ENHANCED (depending on your computer). RAID mode will also support TRIM, and if that is selected, do not change this or else you will likely lose data. If the SATA mode is either IDE EMULATION, COMPATIBILITY, LEGACY or similar, you should change it to improve performance and allow TRIM.

Share:
6,487

Related videos on Youtube

Yang
Author by

Yang

Updated on September 17, 2022

Comments

  • Yang
    Yang over 1 year

    I'm running Ubuntu 10.04 and lshw shows a "SAMSUNG SSD UM41". Any way for me to determine (1) that my SSD supports TRIM, and (2) that my OS and FS (ext4) are actually using this?

    Update: Rather than doing web searches and inspecting various indirect variables, I'd like to get the as direct as possible a confirmation that the system is actually using TRIM, so I'm mostly interested in any tools or techniques for inspection/monitoring for active TRIM use. E.g., many folks point out TRIM has been in Linux since .28, but fail to realize that it was (is?) frequently disabled due to experimental status, that the filesystem has to also support TRIM, and so on.

  • Yang
    Yang over 13 years
    Thanks! However, I was more curious about how I'd determine all this for myself with as direct a confirmation as possible, rather than deriving from various indirect variables. E.g., anything under /proc? Also: doesn't the filesystem need to support TRIM as well? (Using ext4.) If you could just add that to your answer I'll check it off right away.
  • Yang
    Yang over 13 years
    Hmm. Just built hdparm 9.30 and it doesn't mention my disk having TRIM support. Too bad. Gonna ask a follow-up question about how to get to the bottom of this. Thanks.