2

I just rebuilt my disk from scratch (windows 7, ntfs). Each file has been written exactly once, and essentially nothing has ever been deleted or rewritten. The disk is only 20% full. My prediction would have been that at this point, there would be no fragmented files. It's not the case; the disk is already horribly fragmented (according to defraggler's fragmentation report, 34% fragmented 10k fragmented files, 200k fragments).

Why is this so?

5
  • 1
    How did you rebuild it? Reformat & reinstall? Or restored from an image?
    – SadBunny
    Feb 2, 2015 at 1:00
  • I bought a new disk, used system restore to put an OS on it, and either dragged other files on from my backup disk, or ran installers to install software. Oh yea, and installed about 200 windows 7 updates from the last year.
    – ddyer
    Feb 2, 2015 at 1:47
  • So if you've done all that, how did you predict there would be no fragmented files? In other words, why would you think it would not be fragmented?
    – SadBunny
    Feb 2, 2015 at 2:50
  • the disk is only 20% full, and nothing had been rewritten or deleted. For the most part, there was only 1 process at a time ever creating new files, and every file had a known size before it was created. This seems like the simplest possible scenario for an OS to cope with.
    – ddyer
    Feb 2, 2015 at 2:54
  • How does System Restore allow an OS to be installed from scratch? Don't you mean you installed the OS from DVD?
    – misha256
    Feb 3, 2015 at 2:25

1 Answer 1

1

You are making sweeping assumptions:

Each file has been written exactly once

That's not true.

nothing has ever been deleted or rewritten

Also not true.

only 1 process at a time ever creating new files

Definitely not true.

Windows is a complex OS with multiple processes and threads running simultaneously, many of which write to the hard drive simultaneously especially during OS setup, installation of updates, and installation of applications.

A lot of fragmentation occurs with log files, as they are naturally appended to. Modern Windows does heaps of logging, far more than you may think, so that will account a fair amount of the fragmentation you're seeing.

Also when it comes to updates, Microsoft employs sophisticated delta update technology that patches parts of files which can easily result in fragmentation.

Then there's the .NET Optimization Service which pre-compiles .NET assemblies in the background (especially during install/update of .NET). This background activity causes fragmentation as it goes on while other activities are taking place.

I could go on and on, but I'm sure you get the idea.

The fragmentation you see is totally normal in modern Windows, which is why it's good practice to defragment after an OS install on non-SSD hard drives.

2
  • None of these things is a surprise to me, but the magnitude of the impact is.
    – ddyer
    Feb 3, 2015 at 21:28
  • @ddyer Yeah, it's got everything to do with how much Windows has evolved since NTFS came about. Back in the Windows NT days files were small, far fewer, and generally written to disk sequentially (exactly as you were suggesting in your question). NTFS has not evolved to the same extent as Windows and, one could argue, does not cope well with modern usage patterns in terms of fragmentation. Microsoft has recognized this issue which is why, out of the box, modern Windows has scheduled defragmentation enabled.
    – misha256
    Feb 3, 2015 at 21:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .