Why is Windows defragging my SSD?

Page 4 of 5 FirstFirst ... 2345 LastLast

  1. Posts : 7,257
    Windows 10 Pro 64-bit

    CountMike said:
    Right, one of my SSDs is on third and other one on it's second computer.
    I still have 2 SSDs from 2013.
      My Computers

  2. Posts : 19,215
    W11+W11 Developer Insider + Linux

    NavyLCDR said:
    Do they have "dashboard" programs that tell what percentage of life is left on them?

    Attachment 131362
    No, but I use SSD-Z for that:
    Why is Windows defragging my SSD?-image.png
    Why is Windows defragging my SSD?-image.png
      My Computers

  3. Posts : 7,257
    Windows 10 Pro 64-bit

    CountMike said:
    No, but I use SSD-Z for that:
    Why is Windows defragging my SSD?-image.png
    Wow theres a "z" program for all aspects now! I knew of cpu-z and gpu-z but not ssd-z!
      My Computers

  4. Posts : 1,327
    Windows 10 Home x64

    Doesn't seem to like my Nvme though.....

    Why is Windows defragging my SSD?-ssd-z-1.png
    Why is Windows defragging my SSD?-ssd-z-2.png
      My Computer

  5. Posts : 13,586

    NavyLCDR said:
    Do they have "dashboard" programs that tell what percentage of life is left on them?

    Attachment 131362
    Crystaldiskinfo tells you this.
      My Computer

  6. Posts : 19,215
    W11+W11 Developer Insider + Linux

    Have that too:
    Why is Windows defragging my SSD?-image.png

    Why is Windows defragging my SSD?-image.png
      My Computers

  7. Posts : 61,587
    64-bit Windows 11 Pro for Workstations

    bumboola said:
    Hi Shawn, yes trim is enabled and I checked it previously with the command prompt to make sure. The defragmentation is 100% being performed (System Restore is enabled) and it shows up in the Event Viewer as "The storage optimizer successfully completed defragmentation on Windows (C: ) and "The storage optimizer successfully completed defragmentation on WINRE_DRV." These events are preceded with a "The storage optimizer successfully completed retrim on Windows (C: ) event. All three are listed as Event ID 258 and Task Category is listed as none.

    What I am looking for is an explanation of what and how it is performing the defragmentation. If it only used the standard defrag tool in Windows how would it have any idea what to do with a SSD? I initially thought it was only dealing with the System Restore/Volsnap files but it is defragging the recovery portion of the drive as well which I don't believe contain any Volsnap files. It appears to be a full defragmentation judging by the time it took (several minutes) and that the Indicator light for the drive was solid green, so I knew what exactly was happening. It's never solid green for anything else including updates, even the Creators Update.

    My only beef with the Hanselman blog (I'm sure he's a very intelligent guy) is what I posted above, that he stated that the SSD will get intelligently defragmented, gives no explanation of what that means and then kept walking it back in response to people asking him what exactly that meant. Microsoft has never (to my knowledge) explained this at all and should have put out a KB or some official documentation on what is going on here. Ever since Windows 8 came out they just kept saying that Windows does not perform defragmentation on SSD drives when a lot of people complained that it was indeed doing just that. This was the official line and the Hanselman blog was the sole place that later stated anything differently. Before that his line was that Windows doesn't defrag SSDs period. Obviously he talked to someone in storage that was a lot more intelligent (or less evasive) than the first one that told him that it doesn't.

    The least they could do is put out something official that fully explains the process and I'm sure most users of Windows with SSD drives would like to know and appreciate that as well.

    Just to verify, could you post a screenshot showing PowerShell after running the command like below?

    I'm thinking the word "defragmentation" in the report may just be a generic term used. Especially with "The storage optimizer successfully completed retrim on Windows (C: )" in your event log.

    If your PowerShell includes "retrim" and "trimmed" like mine below, then the SSD is indeed being trimmed instead of defragged.

    Optimize-Volume -DriveLetter C -Verbose

    Why is Windows defragging my SSD?-optimize-volume.png
      My Computers

  8. Posts : 87
    Windows 10 Home 64-bit 1809
    Thread Starter

    Ok Shawn, looks just like the screenshot you posted.

    Problem is, I'm not convinced. This was about a three second procedure with hardly any drive activity, when it is defragmenting it takes at least 5 minutes and the drive indicator is lit solid green. According to what I have read the optimizer will trim the drive weekly (what I have set it at) and once a month will defragment the drive. Since it just happened a couple of days ago it will not defragment now. I think this is borne out by the Event Viewer, first a retrim then a defragmentation of drive C and third a defragmentation of the recovery drive. This is well explained in Vadim Sterkin's blog: Why Windows 10, 8.1 and 8 defragment your SSD and how you can avoid this – Вадим Стеркин

    It IS performing a defragmentation once a month and will do so once a month as long as system restore is enabled. Since I'm not willing to disable this it is something I'm going to have to live with. I would still love to know what kind of method Windows is using to defragment it, or a step by step method to prevent it without affecting anything else.
    Attached Thumbnails Attached Thumbnails Why is Windows defragging my SSD?-untitled.png  
    Last edited by bumboola; 23 Apr 2017 at 00:49.
      My Computer

  9. Posts : 2,826
    Windows 10 Pro X64


    Much ado about nothing really.
    It (defrag) isn't defragmenting the files in the same way a HDD (AKA spinner) is. It is in fact just optimizing the file system as there's a limit to the amount of fragmented files it can support.
    Why it wants to do this while System Restore is active is a mystery to me as this is just a pretty static shadow copy of the system at a certain point in time.

    If you'd analyse the actual command line parameters to invoke it then you'll notice the /O parameters which is the same as Optimize for SSD in a GUI interface.

    The whole issue would not arise if only MS and associates would clearly distinguish the words Defragmentation and Optimization. Unfortunately they don't and everyone's as confused as a barking bird....

    Whilst you can arrange files on an SDD so there's no fragmentation, there's actually little point in doing so due to the lack of moving heads to read the files. Latency on an SSD is extremely low.

    As Doogie mentioned before, it might be a different story if you'd be running PetaByte sized datacenter stuff writing tons of data a second.
    But even then most of this is managed by the drives's controllers.

    If you're really worried about this then run some cacheing software that will prevent fragmenation in the first place. It's effective and fast as it uses DRAM as a cache.

    On a home system ? I wouldn't worry about it.

      My Computers

  10. Posts : 3,257
    Windows 10 Pro

    There's a relatively good article here. The author works for an SSD manufacturer, so they should have a pretty good idea of what is going on:

    To Defrag or Not to DefragThat Is the Question for SSD | RTC Magazine

    It discusses how SSD's still suffer from some fragmentation performance hits. Particularly, it goes into details about how the more fragments there are, the more the OS must process the files to deal with them (irrespective of the physical disk slowness)

    Windows does a certain amount of SSD defragmentation, from what I understand this is mostly oriented around the File System itself, system structures, folder structures, and MFT (Master File Table), but not the actual files themselves.
      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 15:19.
Find Us

Windows 10 Forums