Linux 5.13 To Bring A Huge Speed-Up For MD RAID10 DISCARD Handling

Written by Michael Larabel in Linux Storage on 26 March 2021 at 06:05 AM EDT. 2 Comments
LINUX STORAGE
For those running Linux MD RAID10 arrays you may have found the performance around discard requests such as when running MKFS and FSTRIM operations to be rather slow... Well, with Linux 5.13 it will be lightning fast.

For years there have been reports of slow DISCARD handling for RAID10 MD block devices under Linux... There have been bugs file as well over this slow DISCARD performance of MD RAID10 leading to abnormally long MKFS operations and more.

Thanks to Red Hat's Xiao Ni, Linux 5.13 is set to bring a big optimization for the discard request handling for MD RAID10. To the MD RAID10 code, Xiao Ni did a rewrite of the discard request handling code. The improvement is based on MD's earlier RAID0 optimized discard handling that happened back in 2017. The end result is running mkfs.xfs on a MD RAID10 array dropped from taking 4 minutes and 40 seconds to now.... less than 1 second!


This dramatic speed-up from 280 seconds to less than 1 second has now been queued into Linux-block's for-next branch ahead of the Linux 5.13 kernel from md-next. Thus barring any issues from coming up, this optimization will be found in Linux 5.13.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week