Btrfs With Linux 6.0: Send Protocol v2, ~3x Boost For Direct Read Performance
SUSE's David Sterba sent in the Btrfs file-system updates on Monday for the in-development Linux 6.0 kernel.
With Btrfs in Linux 6.0 there is now Send Stream v2 support. The Btrfs send/receive functionality allows for generating a stream of changes between two sub-volume snapshots that can be used for efficient archival/back-up purposes. With Linux 6.0 is the v2.0 protocol update that adds support for reading/writing compressed data, among other enhancements. The updated send protocol for Btrfs also allows writing data chunks larger than 64K, inode creation time and other timestamps can be sent, and file attributes can also be sent.
Btrfs with Linux 6.0 also shows commit stats via sysfs, RAID5/RAID6 fixes, various zoned improvements, fixing the repair of compressed extents, and various other improvements to the Btrfs driver code.
Some of the performance work includes reducing the amount of reserved metadata for delayed items to improve throughput and reduce lock contention, micro-optimizations to the metadata item access bounds checker (a few percent improved runtime for metadata-heavy operations), and increasing the direct I/O limit for read to 256 sectors. That change to increase the direct I/O read limit to 256 sectors yielded a 3x throughput improvement on a sample workload.
To now Btrfs limited the direct I/O reads to a single sector while Christoph Hellwig bumped it to the "somewhat arbitrary" limit of 256 sectors. This significantly boosts the direct read performance. A test case of FIO doing 1 MiB asynchronous I/O reads with a queue depth of one was able to roughly triple the throughput from 65 to 196 MiB/s.
Overall this is another great feature update for Btrfs with Linux 6.0. The full list of Btrfs patches for the v6.0 merge window can be found via this pull request.
With Btrfs in Linux 6.0 there is now Send Stream v2 support. The Btrfs send/receive functionality allows for generating a stream of changes between two sub-volume snapshots that can be used for efficient archival/back-up purposes. With Linux 6.0 is the v2.0 protocol update that adds support for reading/writing compressed data, among other enhancements. The updated send protocol for Btrfs also allows writing data chunks larger than 64K, inode creation time and other timestamps can be sent, and file attributes can also be sent.
Btrfs with Linux 6.0 also shows commit stats via sysfs, RAID5/RAID6 fixes, various zoned improvements, fixing the repair of compressed extents, and various other improvements to the Btrfs driver code.
Some of the performance work includes reducing the amount of reserved metadata for delayed items to improve throughput and reduce lock contention, micro-optimizations to the metadata item access bounds checker (a few percent improved runtime for metadata-heavy operations), and increasing the direct I/O limit for read to 256 sectors. That change to increase the direct I/O read limit to 256 sectors yielded a 3x throughput improvement on a sample workload.
Btrfs continues seeing very healthy performance improvements.
To now Btrfs limited the direct I/O reads to a single sector while Christoph Hellwig bumped it to the "somewhat arbitrary" limit of 256 sectors. This significantly boosts the direct read performance. A test case of FIO doing 1 MiB asynchronous I/O reads with a queue depth of one was able to roughly triple the throughput from 65 to 196 MiB/s.
Overall this is another great feature update for Btrfs with Linux 6.0. The full list of Btrfs patches for the v6.0 merge window can be found via this pull request.
21 Comments