Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon

Btrfs makes multiple performance improvements to be shipped in the next Linux Kernel release

Save for later
  • 2 min read
  • 25 Oct 2018

article-image

In order to prepare for the Linux 4.20 release, there are multiple performance improvements made to the Btrfs file-system. These changes are to be shipped in the next Linux kernel release.

Btrfs is a modern ‘copy on write’ filesystem for Linux. It offers a lot of features not readily available in other in-tree Linux file-systems such as fault tolerance, repair, and easy administration.  However, its performance has been degrading for some time (partially because copy-on-write by default damages some workloads). However, with performance improvements for the Linux 4.20 release, there should be multiple speed-ups to Btrfs.

Improvements include more files/sec in fsmark, better perf on multi-threaded workloads (filebench, dbench), fewer context switches and overall better memory allocation characteristics (multiple benchmarks). Apart from general performance, there's an improvement for qgroups + balance workload.

Performance improvements


Btrfs has deprecated the blocking mode of path; only the spinning mode is used. Blocking mode of path is eliminated because it resulted in unnecessary wakeups and updates to the path locks.

Improvement for qgroups + balance workload include speedup balancing with qgroups, as well as skip quota accounting on unchanged subtrees. The overall gain is about 30+ % in runtime.

A small improvement has been made to rb-tree to avoid pointer chasing. rb-tree with cached first node is now used for several structures.

Btrfs now has better error reporting, after processing blockgroups and whole device. It continues trimming block groups after an error is encountered. It also has less interaction with transaction commit that improves latency on slower storage (eg. image files over NFS).

Cleanups in Btrfs

  • Unused struct members and variables are removed
  • Function return type cleanups are performed
  • Unlock access to the largest independent learning library in Tech for FREE!
    Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
    Renews at €18.99/month. Cancel anytime
  • Delayed refs code refactoring is done
  • Protection is provided against deadlock that could be caused by crafted image that tries to allocate from a tree that's locked already


These are just a select few updates. Read the full list of changes in a post by David Sterba.

Linux 4.19 kernel releases with open arms and AIO-based polling interface; Linus back to managing the Linux kernel.

KUnit: A new unit testing framework for Linux Kernel

bpftrace, a DTrace like tool for Linux now open source