https://www.phoronix.com/news/Uncached-Buffered-IO-2024 Phoronix * Articles & Reviews * News Archive * Forums * Premium Ad-Free * Contact * Popular Categories * Close * * Articles & Reviews * News Archive * Forums * Premium * Contact * Categories Computers Display Drivers Graphics Cards Linux Gaming Memory Motherboards Processors Software Storage Operating Systems Peripherals * [ ] [Search] Uncached Buffered IO Is Performing Great, Working Now On Btrfs / EXT4 / XFS Written by Michael Larabel in Linux Storage on 13 November 2024 at 06:38 AM EST. 15 Comments LINUX STORAGE As covered last week Linux I/O expert Jens Axboe has been taking a fresh pursuit of uncached buffered I/O for Linux. This "RWF_UNCACHED" work was originally started back in 2019 while a renewed effort around it is showing ~65% faster read/write performance and so far has been extended to work across EXT4, Btrfs, and XFS file-systems. With good progress on his patches last week, this week he's sent the series off to the mailing list for further review and collaboration. In the patch series Axboe sums things up elegantly for those not following the latest progress or unfamiliar with the prior uncached buffered IO work with the RWF_UNCACHED flag: "Why do this, you may ask? The tldr is that device speeds are only getting faster, while reclaim is not. Doing normal buffered IO can be very unpredictable, and suck up a lot of resources on the reclaim side. This leads people to use O_DIRECT as a work-around, which has its own set of restrictions in terms of size, offset, and length of IO. It's also inherently synchronous, and now you need async IO as well. While the latter isn't necessarily a big problem as we have good options available there, it also should not be a requirement when all you want to do is read or write some data without caching. Even on desktop type systems, a normal NVMe device can fill the entire page cache in seconds. On the big system I used for testing, there's a lot more RAM, but also a lot more devices. As can be seen in some of the results in the following patches, you can still fill RAM in seconds even when there's 1TB of it. Hence this problem isn't solely a "big hyperscaler system" issue, it's common across the board." But the real kicker are the easy wins with ~65% faster read and write performance while also having lower CPU usage. "Performance results are in patch 8 for reads and patch 10 for writes, with the tldr being that I see about a 65% improvement in performance for both, with fully predictable IO times. CPU reduction is substantial as well, with no kswapd activity at all for reclaim when using uncached IO. Using it from applications is trivial - just set RWF_UNCACHED for the read or write, using pwritev2(2) or preadv2(2). For io_uring, same thing, just set RWF_UNCACHED in sqe->rw_flags for a buffered read/write operation. And that's it." Hopefully this uncached buffered I/O support manages to make it into the mainline Linux kernel soon. 15 Comments Tweet Related News Bcachefs Squeezes More Fixes Into Linux 6.12 OpenZFS 2.3-rc3 Adds JSON Output For Commonly Used Commands Fresh Take On Linux Uncached Buffered I/O "RWF_UNCACHED" Nets 65~75% Improvement F2FS File-System Adding Device Aliasing Feature For Nifty Uses Bcachefs Reining In Bugs: Test Dashboard Failures Drop By 40% Over Last Month Linux NETFS Patches Help With CIFS Performance, Single Blob Objects 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 Intel Spots A 3888.9% Performance Improvement In The Linux Kernel From One Line Of Code Fedora KDE Desktop Spin Promoted To Same Tier As GNOME-Based Fedora Workstation NVIDIA Outlines Current Wayland Limitations & Upcoming Driver Features Microsoft Announces Open-Source Hyperlight For Embedded VMM Within Linux/Windows Apps systemd 257-rc1 Released With A Ton Of New Features & Changes Hyprland 0.45 Compositor Smooths Round Edges, Window Snapping For Floating Windows Intel Linux Patch Would Report Outdated CPU Microcode As A Security Vulnerability GIMP 3.2 Will Aim To Be Out Within One Year Of GIMP 3.0 Latest Linux News OpenMP 6.0 Released With An Emphasis On Easier Parallel Programming Upstream Linux Developers Take Aim At TUXEDO's Out-Of-Tree GPLv3 Drivers Red Hat Enterprise Linux 10 Enters Beta With Many New Features & Updates AMD 3D V-Cache Optimizer Driver To Be Merged For Linux 6.13 Linux 6.13 To Tune Intel Granite Rapids For Better Performance Out-Of-The-Box Linux To Allow Disabling TPM PCR Integrity Protection Due To Performance Bottleneck Intel Touch Host Controller "THC" Driver Support Being Worked On For Linux Bcachefs Squeezes More Fixes Into Linux 6.12 AMD Developing Next-Gen Fortran Compiler Based On Flang, Optimized For AMD GPUs Ubuntu 25.04 To Further Enhance Its Installer, Aims For Linux 6.14 Kernel Show Your Support, Go Premium Phoronix Premium allows ad-free access to the site, multi-page articles on a single page, and other features while supporting this site's continued operations. Latest Featured Articles Supermicro H13SSL-N For AMD EPYC 9005 "Turin" 1P Servers Apple M4 Mac Mini With macOS vs. Intel / AMD With Ubuntu Linux Performance Early Benchmarks: AMD EPYC 9005 Performance & Power Efficiency To Lead Further With Linux 6.13 Google Axion CPU With GCE C4A vs. AWS Graviton4 Performance NVIDIA GH200 Grace CPU vs. AMD EPYC 9005 Turin CPU Performance Support Phoronix The mission at Phoronix since 2004 has centered around enriching the Linux hardware experience. In addition to supporting our site through advertisements, you can help by subscribing to Phoronix Premium. You can also contribute to Phoronix through a PayPal tip or tip via Stripe. Phoronix Media --------------------------------------------------------------------- * Contact * Michael Larabel * OpenBenchmarking.org Phoronix Premium --------------------------------------------------------------------- * Support Phoronix * While Having Ad-Free Browsing, * Single-Page Article Viewing Share --------------------------------------------------------------------- * Facebook * Twitter * Legal Disclaimer, Privacy Policy, Cookies | Privacy Manager | Contact * Copyright (c) 2004 - 2024 by Phoronix Media. * All trademarks used are properties of their respective owners. All rights reserved.