SSD with a HDD installed not being trimmed automatically, why?

Page 4 of 4 FirstFirst ... 234

  1. Posts : 56,064
    Multi-boot Windows 10/11 - RTM, RP, Beta, and Insider
       #31

    Just throwing this out, don't really know. Idle time seems to be a factor, as is battery power. Depending on when it tries to do it, these may be self-conflicting.

    SSD with a HDD installed not being trimmed automatically, why?-2019-09-24_19h48_30.png
      My Computers


  2. Posts : 1,806
    Windows 10 Pro 21H1 19043.1348
    Thread Starter
       #32

    Scott Hanselman is a Microsoft employee and has been discussing this topic matter with Microsoft developers in order to convey these facts accurately and in non-developer speak - English. Together they have compiled the material at the link below. Please have a look and decide if you still feel this is a software error or failure to run disk optimizer.

    Here's a snippet;

    Storage Optimizer will defrag an SSD once a month if volume snapshots are enabled. This is by design and necessary due to slow volsnap copy on write performance on fragmented SSD volumes. Itís also somewhat of a misconception that fragmentation is not a problem on SSDs. If an SSD gets too fragmented you can hit maximum file fragmentation (when the metadata canít represent any more file fragments) which will result in errors when you try to write/extend a file. Furthermore, more file fragments means more metadata to process while reading/writing a file, which can lead to slower performance.

    As far as Retrim is concerned, this command should run on the schedule specified in the dfrgui UI. Retrim is necessary because of the way TRIM is processed in the file systems. Due to the varying performance of hardware responding to TRIM, TRIM is processed asynchronously by the file system. When a file is deleted or space is otherwise freed, the file system queues the trim request to be processed. To limit the peek resource usage this queue may only grow to a maximum number of trim requests. If the queue is of max size, incoming TRIM requests may be dropped. This is okay because we will periodically come through and do a Retrim with Storage Optimizer. The Retrim is done at a granularity that should avoid hitting the maximum TRIM request queue size where TRIMs are dropped.


    The real and complete story - Does Windows defragment your SSD? - Scott Hanselman
    BTW, the blog that follows this article is enlightening if you have the time.
    Compumind said:
    It should. Perhaps there is a bug or corruption. Have you tried looking at the Task Scheduler?
    I have changed one of the conditions in the task scheduler, I removed the check for 'Stop if the computer switches to battery power. I leave my laptop idle while powered on a daily basis and I would expect long enough to trim my SSD.

    Compumind said:
    Now, a few questions -

    1) Who is the manufacturer of your SSD? They might be the best source to answer some of your new questions.
    Samsung 970 evo 500GB NVMe. I've looked around several Samsung sites and can't locate anything definitive.

    Compumind said:
    2) It is interesting to note your interest/comment of Write Amplification. Therefore, here is a downloadable PDF that might answer many of your questions: Internal Error (Ignore the URL error.)
    Thanks, that does agree with the information I've read so far, mostly.

    Compumind said:
    3) TRIM Performance Testing in Windows 10: https://docs.microsoft.com/en-us/win...1-2878d4fec369
    This test looks interesting if I wasn't using my SSD on a daily basis. Check this line in the description;
    The test is destructive and therefore the disk cannot be the boot drive. I did see another Trim test that was non-destructive, I'll try to locate it again.

    Compumind said:
    Hope this helps you isolate the problem. I wish that I was in front of your system.

    Please post back if you find the answer to the scheduling.

    Thanks, I'll keep looking when time permits, however; the info above from Microsoft makes me think I already have the answer. Have a look and let me know if you think it looks legit. Cheers,

    - - - Updated - - -

    f14tomcat said:
    Just throwing this out, don't really know. Idle time seems to be a factor, as is battery power. Depending on when it tries to do it, these may be self-conflicting.
    Thanks, I did untick the Stop if the computer switches to battery power.
    Attached Thumbnails Attached Thumbnails SSD with a HDD installed not being trimmed automatically, why?-0924-task-scheduler-defrag.jpg  
      My Computer


  3. Posts : 736
    Windows 10 x64 Pro
       #33

    @W10 Tweaker

    did you ever figure this out? I found this thread due to the same issue. I have disabled scheduled optimization on all my mechanical hard disks as most of them are hard/long/giant archive drives. aka 10tb plex drives. however I left the SSD which I would have expected to be trimmed on the predetermined schedule during maintenance and its not. 20 someodd days later I always end up trimming it myself. The defrag scheduled task is intact and says it was run successfully.

    for some reason its not touching my ssd.
      My Computer


  4. Posts : 1,806
    Windows 10 Pro 21H1 19043.1348
    Thread Starter
       #34

    klepp0906 said:
    @W10 Tweaker
    did you ever figure this out? I found this thread due to the same issue. I have disabled scheduled optimization on all my mechanical hard disks as most of them are hard/long/giant archive drives. aka 10tb plex drives. however I left the SSD which I would have expected to be trimmed on the predetermined schedule during maintenance and its not. 20 some odd days later I always end up trimming it myself. The defrag scheduled task is intact and says it was run successfully.
    for some reason its not touching my ssd.

    To be honest, I haven't been that diligent in continuing to monitor and log this issue, too many other distractions in life. If you read the entire thread and some of the attached links, you may be able to draw your own conclusion on how/when the Trim process actually happens or not.

    From my observations and research I've concluded that the entire subject of Trim, like many other Microsoft issues, is not as clear as one might expect. Somewhere in my reading it was suggested that the defrag schedule (trim for SSD's) is more accurately a verification schedule where-by the OS verifies the disk state.

    One would think the OS would initiate a Trim activity if during the verification process it identifies a disk state outside of specific parameters otherwise what would be the point of the OS verifying the trim state?

    I have observed that (C:) on my SSD does appear to be optimized after 28-30 days, sometimes. I only use my SSD for OS and apps not data, therefore I'm not certain it requires to be trimmed more often than every 28-30 days.

    If you're really curious and interested in learning more on this topic, I'd suggest you study and log your own PC behaviors and present the facts for discussions. Set the defrag schedule to weekly, don't run any manual trim commands, and log your observations for 60-90 days.


    SSD with a HDD installed not being trimmed automatically, why?-0204-defrag-state.jpg


    I'm still fascinated that (C:) and (L:) are trimmed independently when they're both on the same SSD.
    BTW, the last run entry of 2020-0202 9:46 on (C:) did appear in the Task Scheduler. I wish there was a log file history other than the manual one I didn't continue with.

    Another interesting item is the "Needs Optimization" in the Current Status for (L:) .
    Why would Windows report that (L:) needs optimization when it hasn't been used? Is this a result of the dynamic state of (C:) which has impacted the contiguous state of (L:)?

    So if Windows believes (L:) needs optimization and the defrag utility is set to weekly, same as (C:), why would the OS not initiate a Trim activity?
      My Computer


  5. Posts : 736
    Windows 10 x64 Pro
       #35

    W10 Tweaker said:
    To be honest, I haven't been that diligent in continuing to monitor and log this issue, too many other distractions in life. If you read the entire thread and some of the attached links, you may be able to draw your own conclusion on how/when the Trim process actually happens or not.

    From my observations and research I've concluded that the entire subject of Trim, like many other Microsoft issues, is not as clear as one might expect. Somewhere in my reading it was suggested that the defrag schedule (trim for SSD's) is more accurately a verification schedule where-by the OS verifies the disk state.

    One would think the OS would initiate a Trim activity if during the verification process it identifies a disk state outside of specific parameters otherwise what would be the point of the OS verifying the trim state?

    I have observed that (C:) on my SSD does appear to be optimized after 28-30 days, sometimes. I only use my SSD for OS and apps not data, therefore I'm not certain it requires to be trimmed more often than every 28-30 days.

    If you're really curious and interested in learning more on this topic, I'd suggest you study and log your own PC behaviors and present the facts for discussions. Set the defrag schedule to weekly, don't run any manual trim commands, and log your observations for 60-90 days.


    SSD with a HDD installed not being trimmed automatically, why?-0204-defrag-state.jpg


    I'm still fascinated that (C:) and (L:) are trimmed independently when they're both on the same SSD.
    BTW, the last run entry of 2020-0202 9:46 on (C:) did appear in the Task Scheduler. I wish there was a log file history other than the manual one I didn't continue with.

    Another interesting item is the "Needs Optimization" in the Current Status for (L:) .
    Why would Windows report that (L:) needs optimization when it hasn't been used? Is this a result of the dynamic state of (C:) which has impacted the contiguous state of (L:)?

    So if Windows believes (L:) needs optimization and the defrag utility is set to weekly, same as (C:), why would the OS not initiate a Trim activity?
    thank you for the reply, and yes i did read the entire thread. As you noted, its almost as if ones own conclusions must be drawn, which i find hard to stomach. That shouldnt be the case.

    That was/is my plan; to let it sit for over a month and see if it registers any activity. As also noted, my mechanical drives were automatically being handled when I did have them enabled, but the time to do one single disk of that size (and i have 9) was just unrealistic. Especially as often as I'm using my pc, thus as infrequent as it would begin doing so.

    Will post back with what I see some time from now then :P
      My Computer


  6. Posts : 920
    Windows 10 Pro
       #36

    Just to add to the mix, I own an Intel 660p NVME SSD, it is partitioned as one whole drive and the OS (Win10 Pro) is installed there.
    These screen grabs are from the Intel SSD toolbox app.
    SSD with a HDD installed not being trimmed automatically, why?-ssd01.png
    SSD with a HDD installed not being trimmed automatically, why?-ssd02.png
    SSD with a HDD installed not being trimmed automatically, why?-ssd03.png

    As you can see Intel recommends running TRIM once a week even though there is conflicting information depending on where you look, some say once a month others weekly, i have even seen 6 monthly as a figure because otherwise you damage your SSD (this might be old info based on first gen drives).
    I am assuming that Intel know whats best for it's own products so I have disabled Windows Defrag from running under any schedule and just use the Intel toolbox to run TRIM and the Sandisk app's TRIM function for my secondary SATA SSD, a Sandisk 3D Ultra.
    The Intel drive is trimmed once per week since it is the Windows drive and sees the most activity and that is what Intel advise, the Sandisk is a game and application drive so gets trimmed once per month at most and quite often less than that since the only real write operations are game patches/ updates and game saves, most of its time is spent being read from.
    The third drive is a SATA HDD for general file storage and disk images, it rarely has more than maybe 40% in use and has not been defragged in over 2 years and I have yet to notice any slow down.
    Now all this is just for info, I'm not suggesting anyone does the same. I'm also not saying that Windows built in defrag/ optimiser is no good.
    I do however find the range of opinions on when to TRIM and defrag drives conflicting at best and downright confusing at worst, so I will continue to use the manufacturers guidelines.
      My Computer


  7. Posts : 11,390
    Windows 10 Home x64 Version 21H2 Build 19044.1706
       #37

    klepp0906 said:
    ... I left the SSD which I would have expected to be trimmed on the predetermined schedule during maintenance and its not. 20 someodd days later I always end up trimming it myself. The defrag scheduled task is intact and says it was run successfully. for some reason its not touching my ssd.
    Even if you have it set for weekly, Trim only happens monthly.

    This is normal. See defrag - Microsoft Docs under the sub-heading 'Scheduled task'

    Denis
      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 21:19.
Find Us




Windows 10 Forums