A handy chart for quick reference.
The benchmark is quite workload-specific; I measured sequential operations on large sets of small files (rather than random reads/writes on a single large file) – an approach similar to filebench or bonnie++.
Methodology:
-
hardware: 4-core x86-64, 10 15kRPM SAS HDDs in RAID 10, LSI MegaRAID, write cache enabled,
-
software: Linux 2.6.32.x, irqbalance, mkfs.* etc.
-
popular Linux filesystems: ext{2,3,4}, XFS, ReiserFS 3,
-
JFS was intentionally left out: it performs so poorly with small files (3-4x worse than XFS), including it in the benchmark made no sense at all.
-
All filesystems were created with default values and mounted with the
noatimeflag only. -
Data set: each process operated on its individual set of 350,000 files with an average size of 50 kB, 200 files per directory.
-
VFS cache was dropped (or warmed up) where needed.
-
Operations labeled on the chart are not discrete (syscalls). Rather, compound operations were performed on the data sets, i.e.
- unlink and stat are: opendir, readdir, unlink or stat in sequence, closedir
- write is: mkdir (if necessary), open, write, close, chown, chmod
- rewrite is: mkdir (if necessary), open, unlink and the rest as with write
- read is: opendir, readdir, open/read/close in sequence.
-
All operations were in sequential (i.e. readdir) order (rather than random).
-
Operation times are in seconds.
-
All values were averaged from 10 samples.
-
Op times are capped at 450 seconds on the chart, for real times see:
-
raw data (CSV format)
-
ext2 is included in the benchmark, as some systems still use it when journaling is not required.
-
This benchmark is valid only for HDDs. On SSDs, the differences are significantly less pronounced due to no (low) seek time penalty.
-
YMMV
Conclusions: nothing new here, obviously. XFS simply sucks for small files, ext3 is slow, ext2 is faster than ext3, ReiserFS 3 performs nicely with everything but concurrent writes (it uses a global lock for writes: the Big Kernel Lock up to 2.6.33 and now a mutex-based solution). ext4 is the new hotness.
