btrfs - Six Months Later

| Comments

I’ve been running btrfs on my laptop for a little over six months now. I’m very happy with the current state of the file system and I am finally starting to trust my data to it a little more. I am still running daily backups just to be on the safe side.

Last month, I split up my laptop’s second hard drive, a 320 GB spinning platter drive. It is now about one third ext4 and two thirds btrfs. I used the ext4 partition to store backups and KVM disk images.

I believe that when I started using btrfs, I was running Ubuntu’s 2.6.35 kernel. I’ve been compiling my own vanilla kernels since then and I am currently running 2.6.38-rc6-git6. There are a few issues I’ve had with btrfs, and they haven’t improved during any of these kernel upgrades. These issues have been easy to work around, though.

Problem Removing Snapshots

I have cron jobs that snapshot my root and home volumes on an hourly, daily, and weekly basis. I was also taking a snapshot every five minutes, but this caused me too many problems. Creating and removing one snapshot every five minutes was causing the snapshot process to hang up. When this happened, the laptop would need to be rebooted to get snapshotting to start working again.

I was able to improve the situation, but I couldn’t completely eliminate the problem. It was just easier to turn off the five-minute snapshots.

KVM/QEMU Disk Access Speed

There is a huge I/O amplification when KVM accesses disk images stored on btrfs. KVM will show a few hundred kilobytes per second of I/O while at the same time htop will show tens of megabytes per second.

This can be improved a bit by setting cache=none for the KVM disk image, but even with that setting the I/O is amplified by over a ten-to-one ratio.

I’m really looking forward to the day that I can store virtual machine disk images on btrfs. Snapshots and bcp copies of images will save me both disk space and disk I/O.

Some Good Features Just Ahead

There is a lot of good work being done recently. There was a bit of a taste of deduplication work done a few months ago. I am definitely looking forward to being able to deduplicate my virtual machine disk images.

The first patches are in to add online scrubbing to btrfs. The scrubbing will compare the blocks stored on disk with the previously recorded checksums. This will help identify silent corruption of data.

It also sounds like we’ll have a working btrfsck tool in the near future as well.

I’d like to thank everyone working on btrfs for the great job they have been doing. Keep up the good work, and happy PI Day!

Comments