2013-01-15

oracle ext4

Available Mount Options to Improve ext4 Filesystem Performance [ID 1476869.1]
In this Document
Goal
Fix
References

Applies to:

Linux OS - Version Oracle Linux 5.6 and later
Linux x86
Linux x86-64

Goal

What are the mount options to improve ext4 filesystem performance?
 

Fix


The default mount options are deployed usually for maximum performance while maintaining safety for general usage. There are some mount options to optimize ext4 file system according to the needs of the target usage.


barrier=0
This disables the write barriers in Journaling Block Device (JBD). Ext4 file system has barrier=1 by default where ext3 has barrier=0.

Write barriers are used to enforce proper on-disk ordering of journal commits, but they will degrade the performance of the file system. However, if the system does not have battery-backed disks, there is a risk of file system corruption.


data=writeback
By default (data=ordered), all data is forced directly out to the main file system before its metadata (file size, time, owner etc.) being committed to the journal. By changing this option to data=writeback, data ordering will not be preserved, data may be written to the file system after its metadata has been committed to the journal. Only metadata will be journaled.

In order to use this option on the root filesystem, a kernel boot parameter has to be entered:
rootflags=data=writeback
According to ext4 filesystem documentation on Linux Kernel source, the writeback mode can allow old data to appear in files after a crash and journal recovery. Also Oracle does not support files on file systems that do not have a write-through-cache capability. (Document 236826.1 [Supported and Recommended File Systems on Linux])


commit=60                                                                                                                                                                                                                                
This is the number of seconds for each data and meta data sync. Default setting is 5. In case of a power loss, the last 5 seconds of data stored will be lost, but the file system will not be damaged since journaling is active. Increasing this number to large values will increase performance at a cost of data safety.


 

Niciun comentariu:

Trimiteţi un comentariu