Windows 7

It has been a long while since I posted something here, so here goes, another rant.

I was reading the Engineering Windows 7 blogpost about Disk Defragmentation and I instantly got the annyoing feeling again that my favourite defragger JKDefrag new version MyDefrag will still be needed.

To me, the problem is not defragmentation of the disk, that is just treating the symptoms of an ill file system. As in the blog post they acknowledge that there is an abundance of CPU power compared to the disk speed. So why not use that CPU power to determine a better (or maybe optimal) place to physically store the file than the current - perhaps oversimplyfied - algorithm of: find free space, write file in free space routine.

If windows had the notion of something I call 'zones' on the disk, it would be able to achieve much better IO than ever before. Having these zones organized from the outer tracks (fastest) to the inner tracks (slowest). I haven't gone through thorough analysis of all possible zones, but for a Desktop system (like Windows 7) its easy to identify something like:
- a boot zone, containing all files in order of loading to optimize the boot time.
- a working documents zone, containing files that the user is working on at the moment, keeping stats like how fast/often its grows and allocating some buffer space behind the file to avoid defragmentation.
- a program files zone, containing the static (.exe, .dll, config, data) files of the most used processes. These should also be optimized like the boot zone to allow the as-fast-as-possible start-up time. This zone should not contain the parts of large packages (Visual Studio, Office, Sql Server, etc.) that are never or rarely used by the user.
- a log zone, for files being written by programs, but rarely read. Again, using statistics a free space buffer should be included to avoid 'zone' fragmentation. This zone could possibly benefit by having compression configured on it by default. Caches like IE temporary files could also reside here, but better analysis should point that out.
- a documents zone, for (large) files written once, read many times. Like the documents that are no longer worked on. Should also include Music, Photos, Movies, downloaded files, etc.
- a spacehog zone (credits to JKDefrag for this), for files that are rarely/never used, or backup of data already stored in the other zones. Exe's and dll's that are rarely/never loaded into memory should also reside here. This zone could be layed-out reversely on the disk, starting writing files from the slowest inner tracks, outwards to the middle tracks.

Is it really that hard to implement a better strategy? Is NTFS the 'problem' or is there not enough information about the 'file' at the low-level routines that decide which disk sectors to use?

I'd like to see a blog post on this topic. How Windows 7 organizes its files. At its core an Operating System is responsible for this, it should be one of the more important features of an OS, how it manages its slowest resource: the disk.


Posted by: Rudi Larno
Last revised: 19 Jan, 2012 08:47 PM


No comments yet. Be the first!

blog comments powered by Disqus