Mount options for a faster ext4

Here’s a line from /etc/fstab on one of my machines (for a non-SSD partition):

UUID={...} / ext4 noatime,data=writeback,barrier=0,nobh,errors=remount-ro 1 1

Here’s why:

  1. I don’t need to enable barriers for a fixed disk on a battery-backed laptop. (See the mount manpage for how a barrier works. There is a small risk associated.)
  2. The data=writeback option results in only metadata being journaled, but not actual file data. This does engender the risk of corrupting recently modified files in the event of a sudden failure. But if you’re willing to run with it, it provides a great boost to the filesystem’s performance.
  3. noatime disables the atime (access timestamp) feature, which would otherwise cause additional writes to record timestamps for every time an inode is accessed. You can safely enable this.
  4. nobh prevents association of buffer heads with data pagefiles (Only works with data=writeback).

The big impact options are nos. 2 and 3, whereas you can play it a bit safer by ignoring nos. 1 and 4.

About these ads

, , ,

  1. #1 by Bosstiger on September 3, 2012 - 12:29 pm

    Reblogged this on Gigable – Tech Blog.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

@briantford's blog

Code Monkey Speaketh

How To Node

Code Monkey Speaketh

Code Monkey Speaketh

The Daily WTF

Code Monkey Speaketh

Raible Designs

Code Monkey Speaketh

Ashish Shakya

Writer. Stand-up comic. General idiot for hire.

Dilbert Daily Strip

Code Monkey Speaketh

Dilbert.com Blog

Code Monkey Speaketh

Follow

Get every new post delivered to your Inbox.

Join 405 other followers

%d bloggers like this: