Defrag/Drive Optimiser has stopped automatically trimming SSD


  1. Posts : 114
    Windows 10 Pro 21H1 (19043) x64
       #1

    Defrag/Drive Optimiser has stopped automatically trimming SSD


    Has anyone else noticed an issue whereby the Windows Defrag & Optimiser Drive app has stopped optimising their SSD by trim? I have it set to optimise weekly but I opened it the other day and it said "Needs optimisation. 48 days since last retrim". Surely Windows should be doing it automatically?

    Pretty sure this used to be happen fairly regularly by itself, does anyone else ever go into this program to run it manually or check when their SSD was last trimmed? Like I said, it's set to do it weekly but doesn't seem to be taking note of the settings.
      My Computers


  2. Posts : 31,700
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #2

    alexncfc said:
    Like I said, it's set to do it weekly but doesn't seem to be taking note of the settings.
    For trimming an ssd the Optimiser ignores any schedule setting you may have set and only runs automatically once a month. If you have not been using the PC regularly it may have missed its scheduled run. Left running it should eventually catch up on any missed run, but there's nothing to stop you running a trim manually.
      My Computers


  3. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #3

    Hello @alexncfc,

    Funny enough, I have just finished performing some manual testing for this.

    Basically, you can MANUALLY run defrag /C /O [ Letter O ] in EITHER CMD Prompt or PowerShell and it will CORRECTLY run EITHER Defrag or Retrim depending on whether the Drive is a HDD/SSD.

    See my post here > Optimize and Defrag Drives in Windows 10

    See the full Tutorial here > Optimize and Defrag Drives in Windows 10

    I hope this helps.
      My Computer


  4. Posts : 18,434
    Windows 11 Pro
       #4

    I think you need to read carefully what is actually scheduled to occur weekly:

    Defrag/Drive Optimiser has stopped automatically trimming SSD-capture3a.jpg

    The drives are only analyzed weekly, they are not optimized weekly - only as needed. Also, I notice mine were trimmed yesterday, and I did nothing to cause it to happen manually.
      My Computer


  5. Posts : 114
    Windows 10 Pro 21H1 (19043) x64
    Thread Starter
       #5

    Thanks for the replies!

    Interesting that the program ignores the schedule for SSD, I didn't know that.

    With regards to the bit about only analysing the drives, and just optimising them when needed, I would have thought the "Current status" of "needs optimisation" would indicate that it is needed, so it seems odd that Windows would have left it so long (I use my PC daily). I may just have to go in and manually run it myself as suggested. I did used to fire up defrag quite regularly just to check and I'm sure in the past (long before now) that it would optimise my SSD quite regularly.

    On a similar topic, I notice in the Event Viewer I have these "Error" notifications spread out by a week:

    The storage optimiser couldn't complete re-trim on Data and Backups (D:) because: The operation requested is not supported by the hardware backing the volume. (0x8900002A)

    My system has an SSD as well as a standard hard drive (D:) and I am not sure why I'd get this error when it surely knows it doesn't need to run trim on a hard disk? The fact the errors are spaced out weekly suggests this is the defrag scheduler.
      My Computers


  6. Posts : 11,247
    Windows / Linux : Arch Linux
       #6

    Hi there
    I'm still mystfied as to why anybody should even think of defragging HDD's / SSD's these days. Even classical "Spinners" have decent cache sizes so there's usually no problem with picking up data wherever it's located on the disk.

    SSD's have no moving parts so data access is the same wherever it's located on the disk. It's usually in some sort of 2-D array where any address access is the same all over the disk -- no heads to move etc. Modern HDD's have large cache sizes and decent "pre-fetch" algorithms -- the OS can make reasonable guesses as to what data you need next so the data is already in memory when you need it -- so the whole point of "Disk optimisation" isn't really necessary any more.

    I think too many people don't understand how these days the Disk I/O subsystem and the O/S file systems actually work at the "Physical" or OS kernel level. Remember also Disk caching and "pre-fetch" can also improve the whole Disk I/O subsystem. Just forget these days the whole idea of "Disk optimisation" or defragging.

    Cheers
    jimbo
      My Computer


  7. Posts : 1,621
    Windows 10 Home
       #7

    I thought TRIM was aok to have done monthly, if lots of writes/edits/etc are done, maybe weekly?
      My Computer


  8. Posts : 2,800
    Windows 7 Pro
       #8

    Trim has nothing to do with defragmentation, It's a on need basis execution that depends on uses.

    TRIM is a command for the ATA interface. As you use your drive, changing and deleting information, the SSD needs to make sure that invalid information is deleted and that space is available for new information to be written. Trim tells your SSD which pieces of data can be erased.

    The command is different for other interfaces, and goes by different names in different operating systems, but the action is usually referred to as "Trim". No matter what name it goes by,

    Trim works with Active Garbage Collection to clean up and organize your solid state drive. Trim is beneficial, but not mandatory. Because some operating systems do not support Trim, SSD manufacturers design, create, and test their drives assuming that Trim will not be used.

    Technically:
    NAND flash-based SSDs read and write data in units known as pages, and in a typical SSD, 128 pages constitute a single data block. But, before any data can be written or programmed to the SSD, an entire block of data that is no longer needed must be erased. An internal SSD housekeeping operation known as garbage collection helps to streamline the process.

    I my experience if trim disabled under Windows will greatly shorten life expectancy. But it will run only as needed, so 48 days is more than possible with a good wear levelling maintaining things .

    Verify if trim is enabled

    Code:
    fsutil behavior query DisableDeleteNotify
    If you receive DisableDeleteNotify = 0 then Trim is enabled and supported and will run as needed.
      My Computers


  9. Posts : 21,421
    19044.1586 - 21H2 Pro x64
       #9

    alexncfc said:
    .......My system has an SSD as well as a standard hard drive (D:) and I am not sure why I'd get this error when it surely knows it doesn't need to run trim on a hard disk? The fact the errors are spaced out weekly suggests this is the defrag scheduler.
    This silliness of MS sending trim requests to HDDs and being logged as failures in the Event Viewer has existed for months or longer now.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 10:48.
Find Us




Windows 10 Forums