locked
TRIM command not working on SSD drive RRS feed

  • Question

  •  

    System is Win 8 on a core i7-3820.  TRIM command was not working on a previous SSD installed in system, and computer eventually ground to a halt.  Replaced that SSD with a new Samsung 840 256 GB SSD.  TRIM not working on it either.  Samsung tech support says that the reason TRIM not working is that Windows chose a SCSI driver instead of MSAHCI.sys driver when O/S was installed, and that I should get Microsoft to tell me how to change the drivers.  However, if Windows made a mistake in choosing the driver for the SSD, it made the same mistake for all the non-USB drives; here are the registry entries:

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\disk\Enum]
    "0"="SCSI\\Disk&Ven_Hitachi&Prod_HDS723020BLA642\\5&2e959a15&0&000000"
    "1"="SCSI\\Disk&Ven_Hitachi&Prod_HDS5C3030ALA630\\5&9bcdacb&0&000000"
    "2"="SCSI\\Disk&Ven_ATA&Prod_Samsung_SSD_840\\4&a8975d2&0&000000"
    "3"="SCSI\\Disk&Ven_ATA&Prod_Hitachi_HDP72505\\4&a8975d2&0&020000"
    "4"="SCSI\\Disk&Ven_ATA&Prod_Hitachi_HDS72101\\4&a8975d2&0&030000"
    "5"="SCSI\\Disk&Ven_ATA&Prod_Hitachi_HDS72101\\4&a8975d2&0&040000"
    "6"="USBSTOR\\Disk&Ven_Seagate&Prod_Backup+_Desk&Rev_D802\\NA5J9FND&0"
    "7"="USBSTOR\\Disk&Ven_Hitachi&Prod_HDS721010CLA332&Rev_\\FFFACFF0FD000000FF2911FF0FAEDA&0"
    "8"="USBSTOR\\Disk&Ven_Seagate&Prod_GoFlex_Desk&Rev_0D1C\\NA0M3BG4&0"

    TRIM has to work; OW writes become intolerably slow and system crashes. What can I do to make system use MSAHCI.sys, if indeed you agree that is the problem?

    <object height="1" id="plugin0" style=";z-index:1000;" type="application/x-dgnria" width="1"><param name="tabId" value="{6840A36F-6E19-473F-9E69-49BA4A4AAF19}" /></object>

    Charles H Elliott


    <object height="1" id="plugin0" style=";z-index:1000;" type="application/x-dgnria" width="1"><param name="tabId" value="{6840A36F-6E19-473F-9E69-49BA4A4AAF19}" /></object>
    • Edited by CHElliott Monday, April 15, 2013 4:20 PM
    Monday, April 15, 2013 4:18 PM

Answers

  • How do you know that TRIM doesn't work? Run trim-check and post the result:

    http://files.thecybershadow.net/trimcheck/


    "A programmer is just a tool which converts caffeine into code"

    • Marked as answer by CHElliott Wednesday, April 17, 2013 8:24 PM
    Monday, April 15, 2013 6:55 PM
    Answerer

All replies

  • How do you know that TRIM doesn't work? Run trim-check and post the result:

    http://files.thecybershadow.net/trimcheck/


    "A programmer is just a tool which converts caffeine into code"

    • Marked as answer by CHElliott Wednesday, April 17, 2013 8:24 PM
    Monday, April 15, 2013 6:55 PM
    Answerer
  • Thanks for your prompt help.

    I ran TimeCheck 4 times.  The first two times it terminated with the following error:

    "Error: The Logical Cluster Number of extent 78 is not set. Perhaps the file is compressed?"

    The C:\Program Files (x86)\TrimCheck folder was indeed compressed, so I uncompressed it.  Then I ran the TrimCheck again.  It instructed:

    "Test file created and deleted, and continuation data saved.
    Do what needs to be done to activate the SSD's TRIM functionality,
    and run this program again.
    Usually, you just need to wait a bit (around 20 seconds).
    Sometimes, a reboot is necessary."

    I rebooted and ran TrimCheck again, with the following result:

    "Loading continuation data from c:\PROGRA~2\TrimCheck\trimcheck-cont.json...
      Drive path   :  \\.\c:
      Offset       :  103553273856
      Random data  :  31 20 E1 AF AC 1C 81 53 62 04 DA 0F 3D 17 00 15...

    Reading raw volume data...
      Opening \\.\c:...
      Seeking to position 103553273856...
      Reading 16384 bytes...
      First 16 bytes: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF...
    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:."

    Then I ran TrimCheck the fourth and final time.  This time, instead of rebooting after the first pass, I just waited about 30 seconds.  Running the second pass of the fourth run, TrimCheck output:

    "Loading continuation data from c:\PROGRA~2\TrimCheck\trimcheck-cont.json...
      Drive path   :  \\.\c:
      Offset       :  109013196800
      Random data  :  B4 26 90 46 AA CC 86 59 38 4D 68 4C D0 23 4A 17...

    Reading raw volume data...
      Opening \\.\c:...
      Seeking to position 109013196800...
      Reading 16384 bytes...
      First 16 bytes: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00...
    Data is empty (filled with 0x00 bytes).

    CONCLUSION: TRIM appears to be WORKING!"

    So, according to this, the TRIM command is working?

    Obviously, that is great, fantastic news!  But I have to ask, How much faith do you have in the TrimCheck program?  Do you know of another TRIM command test program?

    <object height="1" id="plugin0" style=";z-index:1000;" type="application/x-dgnria" width="1"><param name="tabId" value="{058F9157-B8CD-4C8D-8662-EA21E23C2194}" /></object>

    Charles H Elliott

    Tuesday, April 16, 2013 11:01 AM
  • trimcheck is the only tool I know. Why do you think that TRIM doesn't work?

    "A programmer is just a tool which converts caffeine into code"

    Tuesday, April 16, 2013 6:35 PM
    Answerer
  • <object height="1" id="plugin0" style=";z-index:1000;" type="application/x-dgnria" width="1"><param name="tabId" value="{04E9DD96-DE80-4696-865A-D63F37DD1F4E}" /></object>

    Two reasons:

    1. The O&O Software disk defragmenter can be set to optimize the SSD periodically.  This optimization consists of the TRIM command, not defragmentation.  The O&O defragmenter is set to issue the TRIM command every 2 days.  Every time it does so, it outputs this message: 

    "Action carried out: SSD optimization

    Status: Error 0xc00000bb: The request is not supported.

    O&O Software tech support insists the reason for the error is that my hard disks are labeled by Windows 8 as SCSI devices.  This would be true if their program logic tests for a SCSI device before attempting the TRIM command. The AS SSD benchmark says the SSD's driver is iastorR.sys.  The properties page for the SSD says it is an ATA device, and one of the four drivers for it is iaStorF.sys.  But System Information and the registry keys quoted in my first message to this forum say it is a SCSI device.

    2. I recently bought a new SSD to replace the one in the machine because of the O&O defragmenter TRIM error message and because the computer would pause for long intervals with the "Not Responding" message in the title bar.  I hypothesized that the system could not write to the SSD because the latter was busy erasing blocks, which takes a long time if done online.  It is true that I have not seen the Not Responding message more than once since I replaced the SSD.  And when I took the replaced SSD to a Windows 7 machine, the O&O defragmenter had no trouble "optimizing" it.  Hence my statement that TRIM does not work on Windows 8.

     


    Charles H Elliott

    Wednesday, April 17, 2013 11:34 AM
  • The defrag.exe of Win8 also sends TRIM when you use a SSD. So there is no need to purchase a 3rd party tool.

    "A programmer is just a tool which converts caffeine into code"

    Wednesday, April 17, 2013 5:48 PM
    Answerer