Back in February Chris Mason announced [1] btrfs [2] 0.13, so I thought I’d give it a quick go as I’d not touched it since testing btrfs 0.5 [3] back in August. Back then, on some pretty meaty hardware, there was a considerable difference between XFS and btrfs and I was curious as to how they’d compare now.
The test hardware this time is a quad core Intel box with 8GB RAM and a pair of 750GB SATA drives in a RAID-1 mirror. It is running Kubuntu Hardy Heron (now in beta) with a 2.6.25-rc6 kernel.
A quick blast with Bonnie++ surprised me, btrfs matched XFS for read, writes and rewrites (though with higher CPU usage, presumably due to the fact that it’s checksuming all the data) and then blew XFS away for meta-data operations.
| Operation | XFS | btrfs |
|---|---|---|
| Block write (KB/s) | 50572 | 42087 |
| Block rewrite (KB/s) | 23739 | 23296 |
| Block read (KB/s) | 52512 | 53108 |
| Sequential creates (/s) | 4095 | 23569 |
| Sequential deletes (/s) | 3404 | 15901 |
| Random creates (/s) | 1819 | 27919 |
| Random deletes (/s) | 1397 | 21561 |
Here are the full results:
XFS
Version 1.03b ------Sequential Output------ --Sequential Input- --Random-
-Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
quad 16G 50572 10 23739 4 52512 6 431.6 1
------Sequential Create------ --------Random Create--------
-Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
16 4095 19 +++++ +++ 3404 14 1819 8 +++++ +++ 1397 6
real 23m32.841s
user 0m1.340s
sys 1m33.566s
btrfs
Version 1.03b ------Sequential Output------ --Sequential Input- --Random-
-Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
quad 16G 42087 42 23296 7 53108 9 345.9 1
------Sequential Create------ --------Random Create--------
-Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
16 23569 100 +++++ +++ 15901 99 27919 100 +++++ +++ 21561 100
real 24m28.868s
user 0m1.436s
sys 4m18.040s