Linux dev delivers 6% file system performance increase – says ‘it was literally a five minute job’

 Micron 3500 1TB SSD.
Micron 3500 1TB SSD.
  • Oops!
    Something went wrong.
    Please try again later.

A Linux developer has implemented a couple of changes to a caching algorithm which claim to deliver a 6% performance improvement in I/O operations. IO_uring creator and self-confessed Linux kernel IO dabbler, Jens Axboe, decided to implement the code changes after putting them off for years but admits the changes were “literally a 5 min job” (h/t Phoronix).

Axboe’s patches seem to deliver their performance gains by reducing the number of time queries made to the I/O system. In his RFC patch notes Axboe writes that lots of code is “quite trigger happy with querying time.” There is some code to reduce this already, but the new patchset, described by Axboe as trivial, “simply caches the current time in struct blk_plug, on the premise that any issue side time querying can get adequate granularity through that.” The developer reasons that “Nobody really needs nsec granularity on the timestamp.” Here we have another case of some ingenious thinking delivering measurable benefits in a long-established piece of technology.

Five minutes work for one person delivers 6% I/O benefits for all (Linux users)

In Axboe’s tests the observed 6% improvement in IOPS readings comparing pre-and post-patching. Interestingly the asynchronous I/O interface developer hints that Linux users might see even greater benefits in the real world. This is because in Axboe’s test system he “doesn't even enable most of the costly block layer items that you'd typically find in a distro and which would further increase the number of issue side time calls.” In other words, those using more bloated Linux vendor kernels could get more mileage out of Axboe’s new patches.

Phoronix reckons there is a good chance the RFC patches could be ready for upstreaming with Linux 6.9, later this year. Whenever it arrives, it is great to get extra performance for free, especially as storage can be a common system bottleneck. Meanwhile, if you are in the market for faster or more capacious storage, it might be a good idea to check out our best SSD storage guide which covers everything from budget SATA drives to the latest M.2 PCIe SSDs.