Why Windows 8 and 8.1 defragment your SSD; how to avoid!

Page 2 of 3 FirstFirst 123 LastLast

  1. Posts : 3,257
    Windows 10 Pro
       #11

    Scott Hanselman is also a Microsoft Employee. I will provide the link here again:

    The real and complete story - Does Windows defragment your SSD? - Scott Hanselman

    Actually Scott and Vadim are both wrong. 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.
    That information comes directly from developers on the Windows Storage team. This is not speculation. This is not fantasy. This is fact.

    Windows *DOES* defrag drives once per month by default, and there is a good reason for it to do so... certain filesystem data structures become fragmented to the point of slowing performance despite not being on a physical medium.

    It also performs a TRIM operation, which it does more regularly.

    Note this comment:

    This kind of fragmentation still happens on SSDs, even though their performance characteristics are very different. The file systems metadata keeps track of fragments and can only keep track of so many. Defragmentation in cases like this is not only useful, but absolutely needed.
    In other words, despite the fact that fragmentation may not affect performance due to it being a random access medium rather than a sequential access medium like a disk platter, it can still affect performance due to cluttering up the fragmentation lookup tables, and can actually fill them up if you don't defrag.

    As usual, it's best to let Windows manage this, and not try and second guess it. Microsoft has spent a lot of time and effort analyzing what needs to be done, which is effort you have not done. You are only going by what someone told you.
      My Computer


  2. Posts : 1,557
    W10 32 bit, XUbuntu 18.xx 64 bit
       #12

    Mystere

    I would like to know who dgeddes is, if you are calling this person inaccurate. SSD can handle many rewrites and if that the case, it doesn't matter which Microsoft employee is correct. It will last a lifetime, even if windows does regular defrag every day, only exception is if you have faulty hard drive to begin with. What about dgeddes statement saying Windows 7 doesn't even run defrag if a SSD is detected? My non ssd drive is never defraged but that because I use Macrium.
      My Computer


  3. Posts : 3,257
    Windows 10 Pro
       #13

    groze said:
    Mystere

    I would like to know who dgeddes is, if you are calling this person inaccurate. SSD can handle many rewrites and if that the case, it doesn't matter which Microsoft employee is correct. It will last a lifetime, even if windows does regular defrag every day, only exception is if you have faulty hard drive to begin with. What about dgeddes statement saying Windows 7 doesn't even run defrag if a SSD is detected? My non ssd drive is never defraged but that because I use Macrium.
    According to this, he's a Microsoft employee, specifically a "Senior Support Escalation Engineer" (ie he works in support):

    https://social.technet.microsoft.com/profile/dgeddes%20[MSFT]

    Just because someone works for Microsoft doesn't mean they are always right. However, I do trust developers on the storage team to know what Microsoft is intending Windows to do with defragging rather than a random Microsoft support employee (even if they are a senior one).

    In general, it's true that Windows does not defrag SSD's, except for the once per month situation in which it does an intelligent defrag of volume information specifically designed for SSD's.
      My Computer


  4. Posts : 19,518
    W11+W11 Developer Insider + Linux
       #14

    SSD's FW has built in "defrag" features and does even more than what "Spinners" do. There's also "Load leveling" feature when FW rearranges data using a spare area so all the cells get equal load. They also have different method of arranging data so access to data thru channels get as equal opportunity to be sent thru interface. Erasing data and refilling cells is also handled in much different manner than it would be expected from a HDD.
      My Computers


  5. Posts : 3,257
    Windows 10 Pro
       #15

    All of those things are true, but they only take into account the physical sectors. They don't take into account other things defragging does which are not related explicitly to moving sectors around.

    As an example, there's a file structure called a File Entry, this file entry points to different clusters of disk blocks that the file occupies. Let's say this structure looks like this (grossly simplified)

    FileName.Txt
    Cluster 1 ---> Block 2000, 300 blocks in size
    Cluster 2 ---> Block 5000, 250 blocks in size
    Cluster 3 ---> Block 8000, 1000 blocks in size
    etc...

    Now, defragging will move those blocks around, but more importantly, it will do it in such a way that this file structure now says:

    FileName.txt
    Cluster 1 ---> Block 2000, 1550 blocks in size

    Because this structure is now much smaller, the filesystem is much faster to process. What's worse, these file entry sizes have a limited file size, and if it gets too fragmented, then it can no longer create new fragments and disk writes start to fail.

    So while this is only superficially related to moving the blocks on disk, more importantly, it's creating a single, contiguous block entry in the file entries, which reduces the amount of processing time. This may not seem like much, but spread over 10's or even hundreds of thousands of files it adds up.
      My Computer


  6. Posts : 399
    Windows 10 X64
       #16

    'Defrag on 8/8.1 does not defrag SSDs, it sends commands to trim to optimise it so its perfectly safe to use. I use it without any problems.

    Also a warning about using 3rd party defraggers. You must check to see whether they detect SSDs and act accordingly'

    i disagree Swarfega, you are partially right, true for internal SSD's, not true for external SSD's connected via USB.

    Jeff
      My Computer


  7. Posts : 3,257
    Windows 10 Pro
       #17

    jeffrys said:
    'Defrag on 8/8.1 does not defrag SSDs, it sends commands to trim to optimise it so its perfectly safe to use. I use it without any problems.
    *sigh* You really need to read the entire thread. Yes, Windows 8/8.1 *does* do a defrag of SSD's on occasion, and this is a good thing, and yes, it is safe. Read the linked article above.
      My Computer


  8. Posts : 399
    Windows 10 X64
       #18

    Mystere,

    i did not post this:

    'Defrag on 8/8.1 does not defrag SSDs, it sends commands to trim to optimise it so its perfectly safe to use. I use it without any problems.

    Also a warning about using 3rd party defraggers. You must check to see whether they detect SSDs and act accordingly'


    it was a copy that Swarfega posted. I just responded to it

    Jeff
      My Computer


  9. Posts : 7,724
    3-Win-7Prox64 3-Win10Prox64 3-LinuxMint20.2
       #19

    Looks like a false positive possibly follow your own advice Mystere and read the thread
      My Computers


  10. whs
    Posts : 1,935
    Windows 7
       #20

    I just disable the Disk Defragmenter service. Downside is that you cannot shrink partitions any more. But for that I use Partition Wizard anyhow.
      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:50.
Find Us




Windows 10 Forums