Pages




Wednesday, August 3, 2011



Digg this

FAT, NTFS, and EXT File Systems... What's the Difference?

Hard Drive
OS makers don't talk about it, and most consumers don't know about it, but it's always there.  It's your file system.  Many consumers go through life never giving a second thought to their file system unless they run multiple OS's in their home.  But your file system is important to how files are stored, what systems it's compatible with, and how your system performs in certain situations.  In this post we'll talk about some of the more common file systems, their differences, merits and drawbacks.

Those of you who run Windows either run FAT32 (for older
versions of Windows) or NTFS.  FAT stands for File Allocation Table and 32 means 32-bit.  The basic idea is that a section of disk is set aside to store a file allocation table that consists of entries for each block.  A file or directory entry has the block number of the first block in the file.  The entry in the table that corresponds to the first block has a pointer to the next block and so on until the end of the file is reached.  With FAT, sequential file reads are typically very slow since there is a lot of back and forth between file blocks and the FAT.

NTFS came after FAT with the aim to provide security (something that FAT lacks), improve performance (which is sometimes the case), and provide for larger file sizes and volumes.  NTFS begins with the Master File Table (MFT) for a volume.  Every file in NTFS is described by one or more records in the MFT.  Small files might be stored entirely in an MFT record whereas larger files would be located elsewhere in extents (contiguous storage) on the disk where a pointer to those extents would exist in the MFT.  NTFS makes several improvements over FAT, but allocation and indexing of files still relies on a central table structure which can be a performance lag.  Excessive fragmentation can exacerbate performance problems .

Ext uses indexed allocation where each file has it's own index block or inode.  A file's inode has direct links to disk blocks as well as links to other indirect blocks which in turn may link directly to disk blocks (single indirection) or which may link to other indirect blocks (double indirection).  Location of files, associated directories and associated inodes are optimized on the disk to reduce seek time and shorten reads.  The indexed allocation approach of ext guards against external fragmentation and it proves to work well for most files.

While FAT is a simple file system that is supported for read and write on all major operating systems (which is why it's a good choice for external drives), it has no security and it does not perform well with large files.  NTFS makes improvements on FAT with security and in many cases contiguous reads, but it still suffers some similar ailments.  Ext is generally a good choice for working with most files, however small files would benefit more from contiguous allocation.

No comments:

Post a Comment