windows - Does Defragmenting really help?

20
2014-04
  • Euro Micelli

    Possible Duplicate:
    Is defragging relevant to improving disk performance anymore?

    It used to be that defragmenting a hard drive gave a significant boost to performance. In the DOS days I would even defragment floppies if I wasn't going to make more changes to the files (it took a LONG time, but was well worth it).

    Now... I don't know anymore. I know the theory, but over the last few years I've had a "fuzzy feeling" that not only it doesn't seem to help, but things actually get slower after the first defragmentation of a "virgin" hard drive. I'm not talking about flash drives -- I'm talking good old-fashioned hard drives.

    Also, I've used third party tools that are able to defragment more files (MBR on boot, etc) or have more fancy features, and I don't know that it makes a difference in performance either. They run prettier, sure, but that's not enough for my pocket.

    I don't know if I'm dreaming it. Is there any hard data on this? Does defragment still help in modern Windows?

    My experience has been 99% on Windows XP. How about Vista or Windows 7? Is defragmentation more effective in those versions of Windows?

  • Answers
  • David Spillett

    Defragmenting in general will have little perceptible effect unless the filesystem is very fragmented to start with (i.e. has been around some time and seen a lot of activity, or has become very full (>85%) at some point). Modern filesystems like ext2/3/4 and NTFS are pretty good at avoiding chronic fragmentation.

    There are a few exceptions to this rule:

    1. FAT16/FAT32 filesystems use a beginning-to-end first-fit block allocation algorithm when creating and growing files which leads to very bad fragmentation in many cases
    2. Some defragmenters will do a good job of arranging related files together, specifically those used at boot time. This can improve boot speed though won't improve a lot much else. Later Windows variants do this to a certain extent automatically, so it does not need to be done manually
    3. Back when Windows would start with a FAT filesystem then convert to NTFS during the install process running a defragment after install had completed could make a measurable difference. Some suggest this (defragmenting after install is a useful task) is still the case, many suggest otherwise.

    Also not that if you are talking about a filesystem that will be used by multiple users at the same time, or just multiple applications depending on the I/O load the impart, defragmenting makes little difference (unless the filesystem was in a very messy state to start with) as your drive heads will be flipping back and forth anyway to serve the different concurrent tasks.

  • TheTXI

    Special Note: Do not defrag Solid State Drives. The extra passes are unnecessary and will shorten the lifetime of your drive.

  • JP Alioto

    Some interesting information in Measuring Performance in Windows Vista ...

    Disk defragmentation moves fragmented files to larger contiguous regions on the disk. It moves files accessed at boot and application startup toward the outer edge of the disk, where higher transfer rates can be achieved. Disk defragmentation also uses low-priority I/O.

    It seems it would not only help reduce seek and spin times, but also increase data transfer rates for boot files (decrease boot time).

  • John T

    WinDirStat will give you a good idea of how your data is scattered throughout the hard drive. For files larger than a cluster, the OS will separate it and place it into multiple clusters throughout the disk. When you need to access one of these files, the disk's magnetic head has to move to each location on the platter and read the pieces. If all of these clusters were close together, there would be less movement required and slightly faster file access times. It's also possible your disk isn't the weakest link in the chain so to speak, so the performance gained from defragging may not be as apparent to you. But it does help.


  • Related Question

    windows - How often should I defragment drives formatted as NTFS?
  • Joe Schmoe

    I've heard claims from some people that you don't need to defragment hard drives formatted as NTFS (perhaps even from Microsoft at one time), while others say it needs considerably less defragmenting than FAT.

    So how often should I defragment my NTFS drives?


  • Related Answers
  • tghw

    Personally, I still find that defragging a drive every few months helps keep everything moving quickly. It's not as dramatic an improvement as it used to be, but it still seems to help.

    I'm more curious whether SSD drives will make defragging unnecessary, since the penalty for random reads is so much lower than with HDDs.