dcsimg

Linux Don’t Need No Stinkin’ ZFS: BTRFS Intro & Benchmarks

ZFS may be locked into the Solaris operating system but "Butter FS" is on the horizon and it's boasting more features and better performance.

Benchmarking btrfs

While there are a huge number of benchmarks for file systems, the benchmarks in this article will only use iozone. Iozone is a popular benchmark and allows some control over the range of file sizes and block sizes and produces usually pretty good results for “local” file systems (not distributed file system). For this article, an older system with a 2.0 GHz AMD Opteron64 CPU with a base CentOS 5.3 system was used with btrfs v.0.18 in a 2.6.30-rc1 kernel.

A number of options for btrfs were tested with a single disk and with two disks (identical disks). These options range from using default options for making the file system and for mounting the file system (noted as “standard”) to different mount options. The mount options used are:


  • nodatacow (No data copy on write)
  • nodatasum (No data sum checks)
  • compress (Turn on compression)

The results have 4 columns: write, rewrite, read, and reread. Using iozone a 2GB file was written with a 16,384 record size keeping the results out of the range of cache effects. For comparison the results from the previous article on ext4 are included. There are four results from the previous article: Ext3 (default), Ext4 (default), Ext3 (performance), and Ext4 (performance). The table below lists the options for creating the file system (mkfs.btrfs) and for mounting the file system.

File System
mkfs.btrfs
options
Mount options
Write
MB/s
Rewrite
MB/s
Read
MB/s
Reread
MB/s
Ext3
28.307 28.001 55.791 55.765
Ext4
30.228 29.626 108.701 108.884
Ext3 “optimal”
28.047 26.432 105.565 105.156
Ext4 “optimal”
30.127 29.365 109.889 109.600
Btrfs
Standard
Standard
31.586 31.917 104.104 104.106
Btrfs
Standard
nodatacow,
nodatasum
31.933 31.839 107.157 106.565
Btrfs
-m single
standard
31.513 31.504 105.578 105.828
Btrfs
-m single
nodatacow,
nodatasum
31.874 31.896 105.109 106.565
Btrfs
standard
compress
71.359 71.129 126.660 132.314
Btrfs
two disks,
raid0
standard
49.891 50.318 129.907 132.024
Btrfs
two disks,
raid0
nodatacow,
nodatasum
45.054 45.867 130.655 131.879
Btrfs
two disks,
single
standard
50.144 50.264 126.984 131.130
Btrfs
two disks,
single
nodatacow,
nodatasum
43.834 47.603 131.612 131.470
Btrfs
two disks,
raid1
standard
48.984 50.388 122.818 109.867
Btrfs
two disks,
raid1
nodatacow,
nodatasum
48.196 48.462 131.832 131.807
Btrfs
two disks,
raid10
standard
49.859 50.101 130.655 132.179
Btrfs
two disks,
raid10
nodatacow,
nodatasum
50.072 50.366 129.424 122.828
Btrfs
-m single
-o compress
70.241 69.299 138.849 127.958
Btrfs
-m single
-o compress
nodatacow,
nodatasum
31.976 31.922 107.000 106.728
Btrfs
two disks,
raid0
-o compress
70.234 69.048 130.852 129928
Btrfs
two disks,
raid0
-o compress
nodatacow,
nodatasum
48.762 48.831 130.812 130.202
Btrfs
two disks,
raid1
-o compress
70.467 68.286 130.990 130.051
Btrfs
two disks,
raid10
-o compress
70.900 69.926 130.812 130.202

Next: Benchmark Observations