new: SSD TRIM check tool

Discussion in 'Memory and Storage' started by Fernando 1, Feb 18, 2013.

  1. Fernando 1

    Fernando 1 Senior member

    Joined:
    Jul 29, 2012
    Messages:
    330
    Likes Received:
    0
    Some days ago I found >this< thread at The SSD Review Forum, where a brandnew "SSD TRIM Check Tool" was discussed. The developer of the tool is a Russian named Vladimir Panteleev (nick name: CyberShadow). His Blog with the details can be joined >here<.
    As you can read within the linked Forum thread, I have tested the new tool intensively and found, that last test versions are giving accurate results within a minimum of time.
    This is what the users have to do:
    1. Download the latest tool version from >here<.
    2. Copy the EXE file into the root of C:
    3. Right click onto the EXE file and run the tool as Administrator.
    4. Hit the "Enter" button.
    5. Rerun the tool as Admin ca. 15 seconds later.
    6. If you should get the message "TRIM appears to be NOT WORKING", rerun the tool in intervals of round about 15 seconds.
    7. At least you should get the message "TRIM appears to be WORKING" (provided it really is active within your single or RAIDed SSD).
    Any feedback would be much appreciated.
     
    #1 Fernando 1, Feb 18, 2013
    Last edited: Jun 10, 2014
  2. Loading...

    Similar Threads - TRIM check tool Forum Date
    My SSD always does uber high amounts of garbage collection. In this case, does TRIM help much? Memory and Storage Wednesday at 11:47 AM
    How to manually TRIM an SSD? Memory and Storage Jun 28, 2017
    How to check Trim enable? Memory and Storage Jul 22, 2014
    TRIM check tool Memory and Storage Dec 9, 2012
    Check for TRIM Memory and Storage Aug 10, 2010

  3. Vectronic

    Vectronic Senior member

    Joined:
    Jan 9, 2013
    Messages:
    489
    Likes Received:
    0
    Well, it didn't try destroying my SSD or deleting Windows files... that's a bonus.

    The only feedback I have is... get rid of the "15 second" thing, should be possible for it to "resume" itself.
     
  4. Hallo32

    Hallo32 Guest

    Joined:
    Nov 29, 2012
    Messages:
    11
    Likes Received:
    0
    removed
     
    #3 Hallo32, Feb 18, 2013
    Last edited: Jun 12, 2013
  5. Phynaz

    Phynaz Diamond Member

    Joined:
    Mar 13, 2006
    Messages:
    9,732
    Likes Received:
    527
    I call BS, as there's no way a program can write to "specific locations". The controller on the SSD remaps any writes to the SSD.
     
  6. Fernando 1

    Fernando 1 Senior member

    Joined:
    Jul 29, 2012
    Messages:
    330
    Likes Received:
    0
    Whom do you want to call? Who is "BS"?
     
  7. GarfieldtheCat

    GarfieldtheCat Diamond Member

    Joined:
    Jan 7, 2005
    Messages:
    3,708
    Likes Received:
    1
    It's slang for "not believing it"....he is saying "I call bullshit", claiming that it is false.
     
  8. kbp

    kbp Senior member

    Joined:
    Oct 8, 2011
    Messages:
    577
    Likes Received:
    0
    It does write to a location and then rechecks that "specific" location for the data which is no longer there. I've compared it with a hex editor and it indeed works, at least on my computer.
     
  9. imagoon

    imagoon Diamond Member

    Joined:
    Feb 19, 2003
    Messages:
    5,199
    Likes Received:
    0
    Any current SSD would have remapped the sector(s) it connected to. You would need to use manufacturer specific commands to review the true SSD cells.

    IE if you request a TRIM of a random sector, then reread it, there is no way to verify that a different set of cells were not remapped in.

    In addition, TRIM is simply a delete notification so the drive may have working TRIM and simply 'hasn't bothered' to clear the sector in question yet. TRIM just gives a "to do" list to garbage collection and GC can run when ever it really feels like it.

    Long story short, without knowing how it is testing TRIM, I wouldn't assume the tool has any clue really.
     
  10. Elixer

    Elixer Diamond Member

    Joined:
    May 7, 2002
    Messages:
    9,800
    Likes Received:
    590
    +1

    From looking at the source, here, https://github.com/CyberShadow/trimcheck he says, all it does is "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 deteled disk area"
     
  11. CyberShadow

    CyberShadow Junior Member

    Joined:
    Dec 9, 2012
    Messages:
    13
    Likes Received:
    0
    Yes, it's just heuristics. It attempts to be at least as accurate as the popular method involving a hex editor (it's not quite there yet, but I'm working on it).
     
  12. Phynaz

    Phynaz Diamond Member

    Joined:
    Mar 13, 2006
    Messages:
    9,732
    Likes Received:
    527
    So what you confirmed is both this tool and a hex editor don't work.

    See my initial post. You cannot tell an SSD to write to specific area (cells), period.

    When reading from an SSD you have no idea where (which cells) you are reading from. Period.
     
  13. CyberShadow

    CyberShadow Junior Member

    Joined:
    Dec 9, 2012
    Messages:
    13
    Likes Received:
    0
    Phynaz, I'm not really sure what your point is as I don't think anyone in this discussion made the allusion that the tool attempts to access specific physical addresses (or "cells") on the SSD. All operations are done using Logical Cluster Numbers, which are an OS abstraction.
     
  14. JellyRoll

    JellyRoll Member

    Joined:
    Nov 30, 2012
    Messages:
    64
    Likes Received:
    0
    Yes, but the tool doesn't work is the end result.
     
  15. Phynaz

    Phynaz Diamond Member

    Joined:
    Mar 13, 2006
    Messages:
    9,732
    Likes Received:
    527
    Since you're new here I'm going to assume you don't know how SSD's actually work.

    Here's a good article to begin with http://arstechnica.com/information-...revolution-how-solid-state-disks-really-work/

    Then you may be able to figure out why there isn't a way to tell if trim is actually working from the user perspective.
     
  16. murphyc

    murphyc Senior member

    Joined:
    Apr 7, 2012
    Messages:
    235
    Likes Received:
    0
    I think this is problematic because sata-io doesn't specify the time to garbage collection or what data should be returned before garbage collect has occurred. For purposes of data recovery, it's reasonable for garbage collection to take quite a bit longer than 1 minute, or even a day. Every SSD firmware is different in how it balances static and dynamic wear leveling.

    The application could write a test file, and then obtain the LBAs allocated for that file by the file system. Then the file could be deleted, which should cause the file system to issue the SATA TRIM command to the drive. That flags the equivalent physical pages on the SSD to be marked for garbage collection. However, erasure only actually occurs when all pages in an erase block are so marked, and on a timing of the firmwares choosing. If even one page in a block isn't marked for erasure, it could be minutes, hours or days before the firmware decides to statically move that data to some other physical page so that erase block can be erased.

    I don't understand what question the check tool is trying to answer, that a tool like manufacturer specs, or hdparm -I, doesn't return.
     
  17. Fernando 1

    Fernando 1 Senior member

    Joined:
    Jul 29, 2012
    Messages:
    330
    Likes Received:
    0
    The TRIM Check tool is trying to answer the question: Does the TRIM command pass through the Intel SATA RAID Controller into an SSD RAID0 array or not?
    This question arised especially by the findings of Dufus, which he had layed down >here<. Many users with an Intel 5- or 6-Series chipset RAID0 system want to know, if they got the "TRIM in RAID" feature by flashing the modded Intel RAID ROM or not.
     
  18. murphyc

    murphyc Senior member

    Joined:
    Apr 7, 2012
    Messages:
    235
    Likes Received:
    0
    I think testing in the described manner will produce false negatives. Without knowing the specific behavior of the SSD being testing, you can't know for sure that non-zero information returned for the test file LBA's means TRIM failed. It may just have slow garbage collection (some might call this efficient rather than slow).

    If the firmware modification is designed to enable TRIM passthrough where it previously wasn't enabled, then why would it fail?

    Either you know all the components support TRIM down to and including the drive; or you do what anandtech do when reviewing an SSD which is a performance benchmark based test for TRIM.
     
  19. Engineer

    Engineer Elite Member

    Joined:
    Oct 9, 1999
    Messages:
    38,340
    Likes Received:
    185

    Because it's being modded by "enthusiasts" instead of by Intel and the motherboard makers. It needs to be tested and debugged to make sure that it works across the chipset types as well as the various motherboard BIOS combinations out there.
     
  20. murphyc

    murphyc Senior member

    Joined:
    Apr 7, 2012
    Messages:
    235
    Likes Received:
    0
    I understand that, but the test seems flawed. If the test app is merely asking for LBAs that should have previously been issued TRIM, just because non-zero data is returned doesn't mean TRIM wasn't issued. It could also mean garbage collection hasn't yet occurred.
     
  21. CyberShadow

    CyberShadow Junior Member

    Joined:
    Dec 9, 2012
    Messages:
    13
    Likes Received:
    0
    According to my tests, the tool produces the correct result in the great majority of cases.

    I am the creator of TrimCheck. I would appreciate less assumptions of ignorance about newcomers.

    It provides an easy way to test if the TRIM actually occurred, for the circumstances that the tool tests and the manner the user uses it (i.e. how long the user waited for TRIM to occur). Tests show that using the tool in an appropriate manner (as described by its textual output) produces the correct result on whether TRIM is enabled and working in the great majority of cases.

    As I mentioned above, it is a heuristic, and cannot guarantee to provide an answer with 100% certainty. Through continued testing and improvement, I believe we can achieve a testing algorithm which produces a very low percent of false negatives. Version 0.4, released yesterday, already improves in this regard.

    The tool does not test whether TRIM was issued. It tests whether garbage collection has occured.
     
  22. max347

    max347 Platinum Member

    Joined:
    Oct 16, 2007
    Messages:
    2,327
    Likes Received:
    0
    CMD
    ->
    fsutil behavior query DisableDeleteNotify

    no??
     
  23. CyberShadow

    CyberShadow Junior Member

    Joined:
    Dec 9, 2012
    Messages:
    13
    Likes Received:
    0
    DisableDeleteNotify checks if TRIM hasn't been disabled on your system. It does not provide any information on whether the system is actually sending TRIM commands to any particular drive, or whether the commands are actually acted upon.
     
  24. JellyRoll

    JellyRoll Member

    Joined:
    Nov 30, 2012
    Messages:
    64
    Likes Received:
    0
    Even Anand gets it wrong with this testing, and terribly so. Anandtech did not mention the SandForce TRIM bug that was wide knowledge for six months on many sites. Then they mention it like it was a new discovery.
    Anands test suite tests without the benefit of TRIM, since they test with no filesystem. Hence, it is somewhat unrealistic as it is.
     
  25. imagoon

    imagoon Diamond Member

    Joined:
    Feb 19, 2003
    Messages:
    5,199
    Likes Received:
    0
    Honestly, the only way to really know it plug in an SATA protocol analyzer and watch for the TRIM commands.

    However I can follow the logic here. If you write a pattern file then execute an OS erase and read that set of allocated sectors back and the disk returns all zeros or FF it indicates that something responded to that delete (TRIM) command. What responded is a bit harder to clarify. And a "failure" to me doesn't indicate that something like TRIM isn't there either esp in lazy garbage collection or the off chance you didn't manage to hit a full page.

    Since the OS level sectors don't directly map to the SSD pages, and most SSD's do a copy on write so a single sector may still return values. There is no definition on what should be returned what a TRIM'd sector is read. It could return 00, FF, the original contents or the Bill of Rights in Unicode format if the firmware wanted it to.
     
  26. CyberShadow

    CyberShadow Junior Member

    Joined:
    Dec 9, 2012
    Messages:
    13
    Likes Received:
    0
    The program generates a random block of data each run, so COW should have no role here.

    The program currently recognizes 00 and FF as unallocated. I can add more patterns if anyone reports them. Regardless, the program prints the first 16 bytes of whatever it reads.

    I agree with everything else in your post. I hope you'll agree that this tool is still much better than nothing (or having to run a performance benchmark).