This program provides an easy way to test whether TRIM works on your SSD. It uses a similar method to the one described here, but uses sector calculations to avoid searching the entire drive for the sought pattern. It also pads the sought data with 32MB blocks of dummy data, to give some room to processes which may otherwise overwrite the tested deleted disk area.
The program will set up a test by creating and deleting a file with unique contents, then (on the second run) checks if the data is still accessible at the file's previous location.
You can download a compiled version on my website, here.
Place this program file on the same drive you'd like to test TRIM on, and run it. Administrator privileges and at least 64MB free disk space will be required.
A D compiler is required.
You can use the rdmd
tool (included with DMD) to build trimcheck
:
$ git clone --recursive https://github.com/CyberShadow/trimcheck
$ cd trimcheck
$ rdmd --build-only trimcheck
trimcheck
is available under the Mozilla Public License, version 2.0.
- Fix incorrect free space detection
- Fix support for drives with big clusters
- Fix false negatives due to compressed filesystems
- Write fully random data as padding instead of a repeating pattern (to avoid possible intervention of deduplication components)
- Cryptographically sign executable
- Remove read checks, as they caused tested data to not be TRIMmed in some configurations
- Add symlink detection
- Add support for SSDs which present cleared sectors as filled with 1s instead of 0s
- Pad tested data with 32MB of dummy data on either side
- Initial release