Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

7.3. File Systems

7.3.1. The Ext4 File System

The ext4 file system is a scalable extension of the default ext3 file system available in Red Hat Enterprise Linux 5. Ext4 is now the default file system for Red Hat Enterprise Linux 6, and is supported for a maximum file system size of 16 TB and a single file maximum size of 16TB. It also removes the 32000 sub-directory limit present in ext3.


For file systems larger than 16TB, we recommend using a scalable high capacity file system such as XFS. For further information, see Section 7.3.2, “The XFS File System”.
The ext4 file system defaults are optimal for most workloads, but if performance analysis shows that file system behavior is impacting performance, several tuning options are available:
Inode table initialization
For very large file systems, the mkfs.ext4 process can take a very long time to initialize all inode tables in the file system. This process can be deferred with the -E lazy_itable_init=1 option. If this is used, kernel processes will continue to initialize the file system after it is mounted. The rate at which this initialization occurs can be controlled with the -o init_itable=n option for the mount command, where the amount of time spent performing this background initialization is roughly 1/n. The default value for n is 10.
Auto-fsync behavior
Because some applications do not always properly fsync() after renaming an existing file, or truncating and rewriting, ext4 defaults to automatic syncing of files after replace-via-rename and replace-via-truncate operations. This behavior is largely consistent with older ext3 filesystem behavior. However, fsync() operations can be time consuming, so if this automatic behavior is not required, use the -o noauto_da_alloc option with the mount command to disable it. This will mean that the application must explicitly use fsync() to ensure data persistence.
Journal I/O priority
By default, journal commit I/O is given a slightly higher priority than normal I/O. This priority can be controlled with the journal_ioprio=n option of the mount command. The default value is 3. Valid values range from 0 to 7, with 0 being the highest priority I/O.
For other mkfs and tuning options, please see the mkfs.ext4(8) and mount(8) man pages, as well as the Documentation/filesystems/ext4.txt file in the kernel-doc package.