What does disk defragmenting do?

  • Thread starter Kutt
  • Start date
  • Tags
    Disk
In summary: Partition backups via a file / folder copy from a partition to a folder on another hard drive. In this case, defragmenting saves a lot of time. Since the program I created to do the file / folder copy does this in directory tree order, (all files within a given directory are copied before moving on to the next directory), this also defrags the drive.
  • #36
jim mcnamara said:
Modern disks are much less debilitated by fragmentation. Rotational latency on a SATA III disk at 15000rpm is now miniscule compared to comparable high end drives from the 1990's. Multihead disks reduce seek times.

Interestingly enough, this simply isn't true.

First of all, modern SATA disk drives run at 5400-7200 RPM. A few (the WD Velociraptor series) run at 10,000 RPM. None run at 15000 RPM (15k drives do exist, but they run on a SAS interface rather than SATA, and are pretty much exclusively for enterprise use). Multihead makes no difference to seek time (just look at the seek times for drives of differing capacity that are the same generation - most modern 500GB drives are 1-2 head, while 2TB drives have 4-8 heads). Most modern hard drives have a total access time on the order of 12-18 milliseconds, with the very best consumer drives (the WD Velociraptors mentioned above) getting as low as 7ms or so. The Quantum Fireball EX drive from 1998 (available in capacities up to 12 GB!) had an access time of around 16 milliseconds. Yes, the better modern drives are closer to 12ms, but that's hardly miniscule by comparison.

The bigger factor in why modern drives don't need to be defragged as much is a combination of 2 factors. First, hard drives have a much larger cache and systems have much more RAM. As a result, much more user data is cached, and this somewhat isolates the user from the direct performance impact of the disk itself. Second, the operating system is much more intelligent about how it places data - Windows 7 is much better about preventing fragmentation in the first place, whereas Windows 95 or 98 was much more simplistic in its methods of drive access.
 
Computer science news on Phys.org
  • #37
I have found that there is one case in which it is very useful to defragment Windows machines, and that is immediately after they are installed. Once this initial defrag is done, then blow up the swap file (in the Control Panel options--message me if you want to know how) so that it is already at its maximum size (set the minimum and maximum size of the swap file to the maximum recommended size.). This avoids having the swap file shrink and grow over the years. Providing one large, contiguous allocation for the (invisible to most users) swap file used by the operating system will save you the pain of the system eventually slowing down if the swap file gets broken into multiple pieces that lie far from each other on the disk.

This is especially true if the operating system (and all the files on it) take up a large percentage of the drive.

I've studied computer architecture and memory systems at great length over the years, and I've had a ton of practice with this, and I think this holds even for SDD's--getting that one large allocation for the swap file will help Windows stay tuned up.

Other than this, I doubt it's all that important to defrag the more modern systems even if they have moveable drive parts, because the disks are typically huge as compared with the amount of files on them, which means the drive will just keep allocating new, unfragmented space for a darn long time. Besides, most Windows systems these days will defrag automatically (if you don't stop them) in the background when you are not using the machine. Usually, I tell Windows not to defrag on a schedule or at will, and I do it myself once in a while (usually while watching a ballgame or overnight).
 
Last edited:
Back
Top