Linux 5.10.8 is released, which finally solves the performance problems of Btrfs

Linux kernel 5.10.8 has been released. As the latest version of the Linux LTS 5.10 series, this update solves the performance problem of the Btrfs file system.

Btrfs is a file system that supports copy-on-write (COW). The goal is to replace Linux's current ext3 file system and improve the limitations of ext3, especially the size of a single file, the total file system size or file checking and adding ext3 is not supported Functions such as writable snapshots, snapshots of snapshots, built-in disk arrays (RAID), and subvolumes. Btrfs also claims to focus on "fault tolerance, repair and ease of management."

However, the submission of "btrfs: use btrfs_start_delalloc_roots in shrink_delalloc" in October last year    caused a performance problem: before using the normal write-back path to reclaim the delayed allocation space, we would provide the number of pages we want to refresh, and this commits the change In order to refresh a large number of inodes, this number will increase dramatically in some cases. This seriously affects performance. And because of the follow-up  "btrfs: fix deadlock when cloning inline extent and low on free metadata space"  submitted to use the above changes, it cannot be restored. After testing, decompressing Firefox compressed files (360MiB xz compressed/1.5GiB uncompressed) in 5.10 takes 5 to 20 times longer than in 5.9. This phenomenon is more obvious in SSD.

Therefore, in the  "btrfs: shrink delalloc pages instead of full inodes"  submission, the number of pages to be refreshed is provided in the btrfs_start_delalloc_roots() function, and the refresh problem is solved through the writeback_control structure and the sync_inode() function. Test again (256GiB of ram, 56 cores, 2TiB Intel NVMe drive), the results are as follows:

It can be seen that the effect is remarkable. In addition, this update also includes fixing net.o compilation failures when using older glibc, fixing hardware TID leaks, fixing RTAS machine checks using VMAP stack, fixing deadlocks during recovery, fixing errors when MTU is too large for XDP News etc.

Please check the update announcement for details .

Further reading

Linux 5.10 has the problem of a sharp drop in Btrfs performance

 

Guess you like

Origin www.oschina.net/news/127026/linux-5-10-8-released