Each Unix-like operating system makes use of its own filesystem. Although all such filesystems comply with the POSIX interface, each of them is implemented in a different way.
The first versions of Linux were based on the Minix filesystem. As Linux matured, the Extended Filesystem (Ext FS) was introduced; it included several significant extensions but offered unsatisfactory performance. The Second Extended Filesystem (Ext2) was introduced in 1994: besides including several new features, it is quite efficient and robust and has become the most widely used Linux filesystem.
The following features contribute to the efficiency of Ext2:
When creating an Ext2 filesystem, the system administrator may choose the optimal block size (from 1024 to 4096 bytes), depending on the expected average file length. For instance, a 1024 block size is preferable when the average file length is smaller than a few thousand bytes because this leads to less internal fragmentation—that is, less of a mismatch between the file length and the portion of the disk that stores it (see also Section 6.2 in Chapter 6, where internal fragmentation was discussed for dynamic memory). On the other hand, larger block sizes are usually preferable for files greater than a few thousand bytes because this leads to fewer disk transfers, thus reducing system overhead.
When creating an Ext2 filesystem, the system administrator may choose how many inodes to allow for a partition of a given size, ...