NTFS performances

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

NTFS performances

Post by Pype.Clicker »

Hi! i've gone through an article of A. Tannenbaum about NTFS structure, and it seems that - though it will certainly lead to better access performance than FAT filesystems, i wonder if there isn't a similar flaw.

So i would like to hear the voices of NTFS users to tell if they find it better than EXT2FS, for instance.

If i understood correctly, NTFS stores informations about file in a special file called the Master File Table. The MFT entries include (among other things) the list of sectors that are used by each file. Under EXT2FS, this information is stored in inodes (or in indirect index blocks that are themselves listed by the inode) and when a new block has to be allocated, the file system tries to allocate it in the same blocks group than its inode as possible (therefore reducing seek times for disk access).

If a NTFS partition goes bad, we could find in a situation where the MFT entry is at one end of the disk (and potentially fragmented), and the file data are at the other end. Therefore, every time the file gets new blocks, the MFT must be modified, which requires almost the maximum latency.

Do Windows NT users experience such performance degradations ? do they have to observe "Thou Shalt run Defrag Frequently" commandment of the Win9x user ?

The same observation can be done for disk usage : NTFS has one big bitmap (okay, this is a file, so it's not necessarily located physically at the start of the disk) while EXT2FS scatters its bitmap all across the disk, (each blocks group has its own small bitmap. If a block group fits a cluster, it means that allocating a block in a group and then write data to it is always done at the maximum speed :) )

Or maybe Bill has dark magic in the block allocation policy that forces a fragmentation of the "Free bitmap" file at NTFS formatting, so that its performances approaches EXT2FS ?
Tim

Re:NTFS performances

Post by Tim »

As you point out, potentially any NTFS data structure can be fragmented, since all the on-disk data structures have entries in the MFT. In fact, the only part of the file system which cannot be moved is the boot sector, which contains a pointer to the MFT's own FILE structure.

Regarding how the space for these structures is allocated: I don't know. NTFS.SYS is a large and mysterious FSD. While the on-disk data structures are semi-documented -- enough for people to write read/write NTFS drivers for other operating systems -- I've never seen any description of what goes on inside NT's NTFS implementation.

Certainly I've never noticed any major slowdown which necessitated defragmenting the disk. And there's nothing to stop NTFS.SYS from being clever and allocating space for the MFT and allocation bitmap specially. Now that I think about, each directory may have its own allocation bitmap, for the files located there.
bkilgore

Re:NTFS performances

Post by bkilgore »

I've used NTFS extensively for a few years now, on drives ranging in size from a couple of GB to a 240GB raid striped array, and I've never noticed any major delays from fragmentation. In fact, when I run DiskKeeper, my disk is usually heavily fragmented (since the 240GB drive is used to store a lot of large video files and DVD files, it gets fragmented very easily), and the only thing that defragmenting really helps is copying large files, if it was extremely fragmented. Ive only defragmented this drive once in a year and a half, and it always seems to work well.
Post Reply