Re: File Fragmentation



Cliff Hewitt <somebug@xxxxxxxxxxxxxx>,
In a message on Mon, 05 Dec 2005 16:25:15 GMT, wrote :

CH> Hey folks,
CH>
CH> I understand that ext2 and ext3 are supposed to be better than FAT and
CH> NTFS with respect to file fragmentation, but somehow I was under the
CH> impression that there would be no fragmentation. Clearly, when I run

Wrong. Fragmentation happens and is *normal*. What happens to the O/S
and disk I/O performance when it happens is a whole other issue...

CH> filefrag, I see some files with "discontinuit[ies]". I am interested in
CH> knowing why the fragmentation happens, and what I can do to defragment.
CH> I don't care much that fragmentation occurs, since I blindly accept
CH> the statement "ext/x/ is better than FAT and NTFS," but I'd like to
CH> understand it better for ext2 and 3.

Linux (and UNIX) file I/O works differently than MS-DOS/MS-Windows.
The driver modules (both low-level disk drivers and file system
modules) optimize disk access to minimize disk head travel (seeks) in a
multi-user / multi-tasking environment. This is part of how they were
designed: from the ground up for a multi-user / multi-tasking environment.

The FAT file system was designed for *floppy* disks, under a
single-user / single-tasking environment and was designed to have a
small overhead footprint (to get the maximum use of the small media
(only 360K for early small floppies) for actual data). Since floppy
disks rarely have lots of files that get deleted or re-written and were
commonly used in single-user / single-tasking environments, issues of
disk head movement and/or file fragmentation are pretty much
non-issues. When Microsoft extended MS-DOS to work on hard disks, they
made no attempt to design a new file system that was geared to the
realities of a hard disk and the constant re-use of disk space. NTFS
was sort of an attempt at this, but because of the downward
compatibility requirements and basic mis-designs deep in MS-Windows NT,
NTFS is only marginally better than FAT in terms of performance issues
WRT fragmentation.

CH>
CH> Thanks,
CH>
CH> Cliff Hewitt
CH>

\/
Robert Heller ||InterNet: heller@xxxxxxxxxxxx
http://www.deepsoft.com/ ||FidoNet: 1:321/153
http://www.deepsoft.com/~heller /\







.



Relevant Pages

  • Re: Fat32 vs NTFS ?
    ... With NTFS, the data is distributed around the drive, meaning that if you ... or sequentially across the disk. ... Because the fragmentation map doesn't look as pretty, ... If compression was disabled, the drive would have had to read 4GB, ...
    (microsoft.public.windowsxp.general)
  • Re: File Fragmentation
    ... CH>> CH> NTFS with respect to file fragmentation, but somehow I was under the ... CH>> CH> impression that there would be no fragmentation. ... CH>> and disk I/O performance when it happens is a whole other issue... ... In a multi-user / multi-tasking environment the idea ...
    (comp.os.linux.misc)
  • Re: Constant Freezing - Please help
    ... History under Internet Explorer. ... I agree the problem seems to be RAM and I do think McAfee may have ... What happens to the Most fragmented file list if you run Disk ... Volume fragmentation ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Best XP HD Defragmenter?
    ... I not convinced that totally consolidating the free space is a good ... to make no effort to avoid fragmentation. ... the section about the choice between FAT and NTFS, ... fragmentation but that NTFS doesn't suffer from this problem. ...
    (microsoft.public.windowsxp.general)
  • Re: Computer running very slow
    ... Volume fragmentation ... Folder fragmentation ... have totally inadequate free disk space. ... Also look for Error Reports in the System log in Event Viewer. ...
    (microsoft.public.windowsxp.perform_maintain)