Jump to page content

Bug of the moment 2007-05-12


I’ve written up a proper entry below as you will see, but what I really wanted to write about today was a couple of curious screenshots on BeebMaster’s site of Acorn Computers’ RISC OS:

Were Acorn on drugs?


Semblances of write-free filing

One of the nice things about NTFS is that it is undocumented (unlike its rival, HFS+) which gives me a nice excuse for not understanding some of the things I see. Maybe it’s simply something that was not covered on my Computer Science degree course, or maybe I am just being a huge ignoramus here, but surely the following is impossible?

Windows Defrag reports that a file of 1 kilobyte is in 121 fragments

How can a file of one kilobyte in size be stored in over a hundred fragments? That would make each fragment approximately eight bytes in length. I was not aware that NTFS supported variable-length fragments, but what else can there be to explain such a phenomenon, on a volume that appears to have four-kilobyte clusters?

If NTFS does support variable-length fragments, it would be most interesting, because that would permit you to perform write-free insertion and removal, something that is dependent on fragments having variable length.

Write-free insertion is the ability to insert data into a file without needing to rewrite the entire file in the process. Instead, you add one or more fragments into the middle of the file to hold the extra data, which will most likely not be full. Jenni and I have been contemplating this concept, but it has severe performance penalties, due I think to excessive internal and external fragmentation. Such as, perhaps, a 1 kilobyte file split into 121 fragments.

I imagine there are other reasons for the strange readout above, because Sysinternals’ Contig tool gives what I can only assume is a correct response:

C:\Documents and Settings\Dan\My Documents\My Downloads\Contig> contig -a \WINNT
\system32\config\system.LOG

Contig v1.54 - Makes files contiguous
Copyright (C) 1998-2007 Mark Russinovich
Sysinternals - www.sysinternals.com

C:\WINNT\system32\config\system.LOG is defragmented

Summary:
					Number of files processed   : 1
					Average fragmentation       : 1 frags/file

Maybe Microsoft are simply smoking whatever Acorn were smoking, but in stronger doses.


Posted 12th May 2007 – Comments and questions?