Defragging effect on build performance · 16 December 2005, 11:26

A few weeks ago I was wondering how much does drive fragmentation really effect build performance. At least for my environment.

I did a fairly straight forward experiment. It’s not really perfect with everything controlled but I feel it’s a reasonable test. I tried both the defrag tool in WinXP and Diskeeper Pro 10 which is basically the pro version of the WinXP tool.

As the test case I did a full release build of approximently 15,000 files in 99 projects in a solution of a commercial product. The majority of the code is unmanaged C++. Microsoft Visual Studio 2003 was used.

The steps I ran:

defrag d: /a

devenv product.sln /clean release
devenv product.sln /build release
(two times)

devenv product.sln /clean release
[ms defrag]
devenv product.sln /build release
(two times)

devenv product.sln /clean release
[diskeeper defrag]
devenv product.sln /build release
(two times)

I timed only the build steps. I averaged the two build times of each step. A week later I ran the same test but swapped MS defrag and Diskeeper defrag.


Week #

No Defrag

MS Defrag

DK Defrag

File frag*

1 58:32 51:06 46:43 56%
2 56:50 50:12 42:55 42%

times are in minutes:seconds

*File fragmentation reported by the MS defrag analysis before the builds.

I was not suprised to see that the defragged builds were faster. I was a bit suprised to see that Diskeeper noticably sped up the build over MS defrag. I was expecting to only see a small difference. I may have to register Diskeeper.

* * *