BFQ is a proportional-share storage-I/O scheduler that also supports hierarchical scheduling with a cgroups interface. Here are the main nice features of BFQ.
- Low latency for interactive applications
to our results, whatever the background load
is, for interactive tasks the
storage device is virtually as responsive as if it was idle. For example, even
if one or more of the following background workloads are being
served in parallel:
- one or more large files are being read or written,
- a tree of source files is being compiled,
- one or more virtual machines are performing I/O,
- a software update is in progress,
- indexing daemons are scanning the filesystems and updating their databases,
- Low latency for soft real-time applications
- Also soft real-time applications, such as audio and video players or audio audio- and video-streaming applications, enjoy about the same latencies regardless of the device load. As a consequence, these applications do not suffer from almost any glitch due to the background workload.
- Higher speed for code-development tasks
- If some additional workload happens to be executed in parallel, then BFQ executes the I/O-related components of typical code-development tasks (compilation, checkout, merge, ...) much more quickly than CFQ, NOOP or DEADLINE.
- High throughput
- BFQ achieves up to 30% higher throughput than CFQ on hard disks with most parallel workloads, and about the same throughput with the rest of the workloads we have considered. BFQ achieves the same throughput as CFQ, NOOP, DEADLINE and SIO on SSDs.
- Strong fairness, bandwidth and delay guarantees
- BFQ distributes the device throughput, and not just the device time, among I/O-bound applications in proportion their weights, with any workload and regardless of the device parameters. From these bandwidth guarantees, it is possible to compute tight per-I/O-request delay guarantees by a simple formula. If not configured for strict service guarantees, BFQ switches to time-based resource sharing (only) for applications that would otherwise cause a throughput loss.
More details on the features of BFQ can be found here, and both an 8-minute demo with an SSD and an 9-minute demo with an HDD are available. We have also made a 7-minute demo with an eMMC under Android. In this respect, a specific site on BFQ for Android is now available too (by Luca Miccio).
Systems adopting BFQ
BFQ can be found in Linux from 4.12.0, but only for the new blk-mq framework. The version for blk of BFQ can instead be found in the following systems. First, BFQ is the default I/O scheduler in Manjaro, Mageia, OpenMandriva, Sabayon, Arch Linux ARM (for Marvell Kirkwood) and ROSA, as well as in the Zen Kernel, the pf-kernel, CyanoGenMod for several devices, and many kernels for smartphones. In addition, BFQ is optionally available in Arch, openSUSE, PCLinuxOS and Gentoo. We record a few tens of downloads per day from people using other distributions as well. The feedback we have received so far basically confirms the expected latency drop and throughput boost in everyday use.
Content of this site
In these pages you can find a brief description of the properties of BFQ and of how it works, together with the scheduler interface, the available tunables and the TODO list (plus links to various technical reports). A short history of BFQ is available as well. You can download the sources, and see some of the results we have obtained using an ad hoc benchmark suite. Finally, there is a comparison with other production and research schedulers, including a thorough performance evaluation, carried out using an old implementation of BFQ.