What is Ext4 file system. Explained

Many people who even have much experience in working with Linux are often confused with the term Ext4 which they have seen many times. So lets clear this dilemma and dive into what is Ext4. Ext4 or fourth Extended File System is a filesystem for Linux introduced in 2008. Succeeding ext3, Ext4 was bundled up with many new features.

Ext4 was available from Linux Kernel version 2.6.19 with support for huge individual file size and overall file system size. Maximum file size was taken to new levels with 16TB of file supported by this file system.

Ext4 is a deeper improvement over Ext3 than Ext3 was over Ext2. Ext3 was mostly about adding journaling to Ext2, but Ext4 modifies important data structures of the filesystem such as the ones destined to store the file data. The result is a filesystem with an improved design, better performance, reliability and features.

This  journaling file system came up with lots of features which include:

1. Large file system

Ext4 supports larger file sizes and also supports large volume. File sizes up to 16TB are supported in Ext4 as compared to the only 2TB in Ext3. Also, Ext4 filesystem can support volumes with sizes up to 1 exbibyte.

2. Backward compatibility

It is possible to mount Ext2 and Ext3 as Ext4, Hence Ext4 was made backwards compatible with Ext3.

3. Delayed allocation

Ext4 delays block allocation until data is flushed to disk as compared to other file systems which allocate blocks immediately, even when the data goes into a write cache. It improves the performance of Ext4 significantly.

4. Faster file system checking

In Ext4, at the end of each group’s inode table will be stored a list of unused inodes (with a checksum, for safety), so fsck will not check those inodes. OS whenever file system has to be checked, A lot less work is done by a system which makes it faster by 2 to 20 times(depending on the total number of inodes).

5. Transparent encryption

Support for transparent encryption was added in Ext4 file system.

6. Multiblock allocator

Ext4 uses a “multiblock allocator” (mballoc) which allocates many blocks in a single call, instead of a single block per call, avoiding a lot of overhead. This improves the performance, and it’s particularly useful with delayed allocation and extents.

7. No Journaling mode

Journaling ensures the integrity of the filesystem by keeping a log of the ongoing disk changes. However, it is known to have a small overhead. Some people with special requirements and workloads can run without a journal and its integrity advantages. In Ext4 the journaling feature can be disabled, which provides a small performance improvement.

8. Online defragmentation

Ext4 supports online fragmentation, and there’s a e4defrag tool which can defragment individual files or the whole filesystem.

You can always convert your Ext2 or Ext3  file system into the Ext4 file system. Don’t hesitate to experiment a little. Anyways Google is always there.

  • Add Your Comment