• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

What are the mount options to improve ext4 filesystem performance in Linux

by admin

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 is 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. The only supported journaling mode is “data=ordered” which is the default setting.

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.

Filed Under: Linux

Some more articles you might also be interested in …

  1. ffsend: Easily and securely share files from command-line
  2. calligrasheets: Calligra’s spreadsheet application
  3. CentOS / RHEL 6 : How to setup yum repository using locally mounted DVD
  4. “go doc” Command Examples
  5. lex Command Examples
  6. keychain Command Examples
  7. kaggle Command Examples
  8. atom: A cross-platform pluggable text editor (Command Examples)
  9. paccache Command Examples in Linux
  10. dvc dag: Visualize the pipeline(s) defined in dvc.yaml

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright