Easy TRIM test methods

From Win7 up, all Windows Operating Systems do send TRIM commands to the connected SSDs. TRIM is able to clean the SSD cells, which contain unusable or finally deleted data, and make them instantly re-usable by the Operating System.
Problem:
It is not easy to verify, if the TRIM command actually arrives at its destination, the single SSD or the SSD-RAID array. Until February 2013 the common TRIM detection method was to completely fill the related single SSD or the SSD-RAID array with data and then to determine how long it takes until the benchmark results are recovering to the previous values. Since this method destroys all data and unnecessarily stresses the SSDs, I do not really recommand this method for “normal” users.


A. Automatic TRIM test with the “TrimCheck” Tool

Since February 2013 there is now a tool available, called “TrimCheck” [developed by Vladimir Panteleev], which is able to detect, whether TRIM is actually active within a single SSD resp. within a SSD-RAID array or not. You can get the actual TrimCheck Tool v0.7 from >here< (official developers link) or from >here< (Forum link). Further details about the tool and many test results can be found within >this< thread.

Procedure:
The EXE file has to be copied to the root of drive C: and executed as Administrator. The rest is self-explained by the messages that the tool generates.

This is the message the Tool generates if the tool has not detected TRIM activity in your system’s storage drive:

TrimCheck tool message - TRIM not working.png


And here is the message, if TRIM activity is verified by the tool:

TrimCheck tool message - TRIM is working.png


Although the TrimCheck tool works fine for nearly everyone, however, it seems unable to detect very moderate TRIM activity at any given time.



B. Easy and very effective TRIM test by using a Hex Editor

Here is an easy method, which worked always fine for me and my RAID0 array. It does not have any negative impact on the performance and stability of a running single or RAIDed SSD system. The only thing you need is a Hex Editor like HxD. You can get different language versions of this tool from >this < HxD homepage or the english version of HxD directly from >here< or from >here< (MIRROR). Don’t use the “Portable” version of the tool, because it may give you false negative TRIM test results because of a created ini file (look >here<).

This is the procedure:
(credits go to Marc HFR, who has published the method >here<)

  1. Open any JPG file (should be outside drive C:!) with HxD and copy any unique text code fragment you see on the right side (without any blank space within it).
  2. Copy the JPG file to the root of drive C:.
  3. Run HXD as Administrator and hit “Extras” > “Open drive” > “Drive C:”.
  4. Let HxD search for the previously copied file fragment and note the offset value (left side) and the sector digits (right side), where you found the file fragment of the JPG file.
  5. As colleteral security action let HxD continue the search until you get the message “cannot find …”) (to exclude, that there are more files with the same data on drive C).
  6. Open the Explorer and delete the JPG file from drive C: and then empty the Recycle Bin.
  7. Run HxD again as Administrator, hit “Search” > “Go to…” and enter the exact offset value you have noted before. Wait until the tool found the place. On the right side you must see the same sector digits you have noted.
  8. Scroll a bit down to get the entire sector, where the JPG file was.
  9. Now you see either the same Hex codes as before (=TRIM doesn’t work) or - depending on the SSDs - just 00 00 00 resp. FF FF FF. In the latter case TRIM has cleaned the cells. No Garbage Collection would be able to do that within seconds.

Here is a screenshot of the related hex data section before having deleted the file:

Trim-Test Z77 Win7x64 Pic 1.png


This is how the exactly same hex data section looks, if TRIM is working (freshly deleted data have been zeroed out at once):

Trim-Test Z77 Win7x64 Pic 2.png



By using this method I found out, that Trim was not active within the RAID0 of my Z68 system (first pic), whereas TRIM worked within the same RAID0 array after having replaced the mainboards by a Z77 chipset one (second pic).

Addendum:
If TRIM should work within the RAID, but the “Easy TRIM test” fails, here are some advices:

  1. Some SSDs need a reboot after the delition of the test file to begin the cleaning procedure.
  2. Precondition for the TRIM support is the detection of the related disk drive(s) as SSD (and not as HDD) by the OS. If the Windows “Optimizer” (former “Defrag Tool”) should show the SSD as HDD, the user can force the SSD detection by running the command “winsat diskformal”. This way the detection of an SSD will be forced.
  3. After having made sure, that the SSD has been detected by the OS as SSD, the users should run the new Win8/10 “Optimizer” (former Defrag Tool), which will send a lot of TRIM commands to the SSD. Some SSDs need a TRIM push to start with the cell cleaning.
    Win7 users may alternatively run the “TRIM Triggering” of “Anvil’s Storage Utilities”. You can download this tool from >this< page. The “TRIM Triggering” option can be found within the drop down menue of the header bar point “Benchmarking”.

Have fun!
Fernando

There is also a portable Trim tool available on the Crucial forum that works very well. It also checks alignment. It can be found here: http://forum.crucial.com/t5/Solid-State-…mmer/td-p/51198

This tool sends TRIM commands to the SSD (like the Intel SSD Toolbox and the Win8 Optimizer), but is not able to check, if TRIM really arrives there.

Since the developer Vladimir Panteleev has published a new v0.6 of his TrimCheck Tool, I have just updated the start post of this thread.
Credit goes to our new Forum member RickSteele, who gave us the info about the updated TrimCheck tool version.

Hi guys, I’m undecided whether or not to hold this card. In theory, the trim should be supported, but Trimcheck, under Windows 10, I reported that the trim is not working. I contact Kingston and he said that the program is not reliable, and that to see if the trim works or not we need to refer to this command:

behavior query DisableDeleteNotify

I’m using the shell this command, and I will return 0, as it should be, but in the past when the trim was not supported in Raid 0, gave me the same thing.

I wonder … It’s really reliable?

Thanks

@ RaptorX:
Since your question has nothing to do with the topic "Drivers", but much more to do with the topic "Solid State Drives", I have moved your post into this thread…

This is nonsense, because executing this command will only show the user, whether the OS sends TRIM commands into the direction of the SATA Controllers or not, but doesn’t indicate, whether TRIM really passes through the Controller into the SSD.
Nevertheless the negative result you got by the TRIMCheck tool does not automaticly mean, that there is no TRIM actvity within the SSD.
Reason: The TRIMCheck tool sometimes has problems to detect low TRIM activities.
Solution: Try the manual TRIM test by using an Hex Editor like HxD. You can find a guide about how to do it within the start post of this thread.

Zitat von Fernando im Beitrag #6
@ RaptorX:
Since your question has nothing to do with the topic "Drivers", but much more to do with the topic "Solid State Drives", I have moved your post into this thread..

This is nonsense, because executing this command will only show the user, whether the OS sends TRIM commands into the direction of the SATA Controllers or not, but doesn’t indicate, whether TRIM really passes through the Controller into the SSD.
Nevertheless the negative result you got by the TRIMCheck tool does not automaticly mean, that there is no TRIM actvity within the SSD.
Reason: The TRIMCheck tool sometimes has problems to detect low TRIM activities.
Solution: Try the manual TRIM test by using an Hex Editor like HxD. You can find a guide about how to do it within the start post of this thread.





Fernando Thanks for the answer, and forgive the mistake on the thread. It basically this was the response of Kingston:

Thank you for contacting Kingston Technololgy.

Please note that the TRIM function is provided by the operating system and all of our SSDs are designed to facilitate the TRIM function, when this is active in Windows.

Kingston’s TRIM implementation is optimized for best overall performance in Windows and Linux Trim environments where performance is measured using real OS workloads and not just the writing and deleting of a single file or small number of files. 3rd party utilities like TRIMCheck that utilize the aforementioned testing procedure do not adequately assess the drive’s capabilities.

To check if TRIM is working, type the following code in the Elevated Command Prompt:

fsutil behavior query disabledeletenotify

The results will be either:

A) DisableDeleteNotify = 1 (Windows TRIM commands are disabled)
or
B) DisableDeleteNotify = 0 (Windows TRIM commands are enabled)

Kind regards

I will try the method HxD and let you know.

Thanks for the moment

P.S. I want to sottlineare that are quite disappointed with this card. I thought they were more serious.

I checked with the tool HxD and confirm the TRIM not working. I checked out after the cancellation and codes had not been cleaned from the trim. At this point for this m.2 ssd is a fake.

@ RaptorX:

Did you trigger TRIM, before you have done the test?
TRIM is only detectable, when there is some TRIM activity within the SSD.




And as I can to trigger it?

P.S. I followed your guide to the letter …

If you would have read the start post of this thread, you wouldn’t have asked this.

If TRIM should work within the RAID, but the “Easy TRIM test” fails, here are some advices:

1) Some SSDs need a reboot after the delition of the test file to begin the cleaning procedure.

I’ve tried this but nothing change

2) Precondition for the TRIM support is the detection of the SSD by the OS. Users, who are working with Win7 or Win8, should run the Windows Experience Index (WEI) at first. Only this way they can be sure, that the SSD will be detected as SSD by the OS.

I launched the command prompt. Nothing has changed

3) After having done the Windows Experience Index Win8 users should run the new Win8 Optimizer (former Defrag Tool), which will send a lot of TRIM commands to the SSD. Some SSDs need a TRIM push to start with the cell cleaning.

I launched the optimizer Windows 10, it successfully finds the ssd. No changes. Trying to find the code cells were exactly the same.

P.S. However there is something wrong with this method. Sometimes has also found 50 keys with the same name. I would say very uncomfortable and very incisive.

I think it’s time to return the card. Thanks for the support.

Zitat von RaptorX im Beitrag #12
3)

I launched the optimizer Windows 10, it successfully finds the ssd. No changes.



Did you press the "Optimize" button?

There is no better method available to verify, whether TRIM is active within the SSD or not.
Nevertheless all these TRIM detection methods may fail, when the SSD Controller moves the data during the test.

Zitat von Fernando im Beitrag #13
Zitat von RaptorX im Beitrag #12
3)

I launched the optimizer Windows 10, it successfully finds the ssd. No changes.


Did you press the "Optimize" button?

There is no better method available to verify, whether TRIM is active within the SSD or not.
Nevertheless all these TRIM detection methods may fail, when the SSD Controller moves the data during the test.





Clearly I launched the optimizer of Windows 10 and completed trim cleaning, at least that I have displayed on the screen.

What you say is probably true, the ssd for some reason is always running, in fact, I noticed that the light for the hard disk on your PC is always on, as if he was always working.

I honestly am not satisfied with this product, I expected something better.

Thank you for your time and kindness.

Change it with a Samsung 950 Pro. It’s the best choice, IMHO.

Do you have already experience with this SSD? AFAIK it is not yet available.

Hello,

Available:
ASUS_PRIME_Z270_P
SSD M.2 PCI-Express 3.0 Intel 600p SSDPEKKW128G7X1 128Gb
Windows 7 SP1 + hotfix for NVMe
Driver: Standard controller NVM Express (stornvme.sys)

Question: can not understand, running TRIM or not. When you restart, after a short wait, TrimCheck displays the following.
" First 16 bytes: AE 41 07 45 6C 5F 27 38 EC 17 A0 84 21 52 38 9F…
Data is neither unchanged nor empty.
Possible cause: another program saved data to disk,
overwriting the sector containing our test data.

CONCLUSION: INDETERMINATE.
Re-run this program and wait less before verifying / try to
minimize writes to drive C:."

Codes in the “First 16 bytes:” are constantly the same, instead of 00. What’s the problem?
Thankful in advance.

@wildcat55 :
Welcome at Win-RAID Forum!

It doesn’t make much sense to continuously run the TrimCheck.
Once you get the message, that TRIM seems to be working, everything is ok.
TRIM should be active within your NVMe SSD, but it may be difficult to detect low TRIM activity by the TrimCheck tool.
That is why I recommend to trigger TRIM before running the TrimCheck tool. Please read the start post of this thread.

Since your problem doesn’t seem to be driver related, I have moved your post into this better matching thread.

Regards
Dieter (alias Fernando)

Tried to use HxD, by a method b. from the start post of this thread.
After deleting the file, on this place other codes. And on all free space of the drive some codes, but only not zero. Even after start of the TRIM command in O&O Defrag!
Any encryption system can be installed on this device?!
Only why to cipher empty space, it at me the silly idea…

EDIT by Fernando: Unneeded parts of the fully quoted text removed (to save space)

@wildcat55 :
Since I do not sit behind you and don’t know which programs you have installed, which are writing data onto the SSD in the background, I cannot really help you.