IOCOST.CONF(5)

๐ŸŽ€ IOCOST.CONF ๐Ÿ’…

okay bestie, so this page is iocost.conf(5) โ€” the manual for the config files that drive the iocost solution manager. it's giving "quietly important system file" energy and honestly? iconic. let's get into it. ๐Ÿฆ‹


โœจ NAME โœจ

iocost.conf โ€” configuration files for the iocost solution manager. that's it, that's the name, no notes. ๐Ÿ’–


๐ŸŒธ SYNOPSIS ๐ŸŒธ

/etc/systemd/iocost.conf /etc/systemd/iocost.conf.d/*.conf

๐Ÿ’œ DESCRIPTION ๐Ÿ’œ

so this file configures the behavior of iocost, which is a tool that's mostly used by systemd-udevd(8) rules to automatically apply I/O cost solutions to /sys/fs/cgroup/io.cost.*. no cap. ๐Ÿ”ฅ

the qos and model values get calculated based on benchmarks collected on the iocost-benchmark[1] project, and then turned into a whole set of solutions that go from most isolated to least isolated. and why do we care about isolation? because isolation lets the system stay responsive even when there's high I/O load happening. it's the vibe check for your disk, basically. ๐Ÿซถ

which solutions are actually available for a device can be queried from the udev metadata attached to it. and by default? the naive solution is used, which provides the most bandwidth. simple, loud, unbothered. ๐Ÿ’…


๐ŸŒˆ CONFIGURATION DIRECTORIES AND PRECEDENCE ๐ŸŒˆ

the default configuration is set during compilation, so you only need to configure anything if you need to deviate from those defaults. periodt.

the main configuration file is loaded from one of the listed directories, in order of priority, and only the first file found is used:

  • /etc/systemd/
  • /run/systemd/
  • /usr/local/lib/systemd/ [2]
  • /usr/lib/systemd/

the vendor version of the file contains commented out entries showing the defaults, as a little guide for the administrator. so thoughtful of them. ๐Ÿฅบ

local overrides can also be created by creating drop-ins, as described below. the main configuration file can also be edited for this purpose (or a copy in /etc/ if it is shipped under /usr/), however using drop-ins for local configuration is recommended over modifications to the main configuration file. like, please use the drop-ins bestie. ๐Ÿ™ˆ

in addition to the main configuration file, drop-in configuration snippets are read from:

  • /usr/lib/systemd/*.conf.d/
  • /usr/local/lib/systemd/*.conf.d/
  • /etc/systemd/*.conf.d/

those drop-ins have higher precedence and override the main configuration file. files in the *.conf.d/ configuration subdirectories are sorted by their filename in lexicographic order, regardless of in which of the subdirectories they reside. and when multiple files specify the same option:

  • for options which accept just a single value โ€” the entry in the file sorted last takes precedence
  • for options which accept a list of values โ€” entries are collected as they occur in the sorted files

when packages need to customize the configuration, they can install drop-ins under /usr/. files in /etc/ are reserved for the local administrator, who may use this logic to override the configuration files installed by vendor packages. drop-ins have to be used to override package drop-ins, since the main configuration file has lower precedence. ๐Ÿ’€

it is recommended to prefix all filenames in those subdirectories with a two-digit number and a dash, to simplify the ordering. this also defines a concept of drop-in priorities, to allow OS vendors to ship drop-ins within a specific range lower than the range used by users. this should lower the risk of package drop-ins accidentally overriding drop-ins defined by users. and the recommended ranges are:

  • use the range 10-40 for drop-ins in /usr/
  • use the range 60-90 for drop-ins in /etc/ and /run/

...so that local and transient drop-ins take priority over drop-ins shipped by the OS vendor. respect the number line, it's a whole system. ๐Ÿ”ขโœจ

to disable a configuration file supplied by the vendor, the recommended way is to place a symlink to /dev/null in the configuration directory in /etc/, with the same filename as the vendor configuration file. poof, gone, so clean. ๐Ÿงš


โญ OPTIONS โญ

all options are configured in the [IOCost] section:

  • TargetSolution= โ€” chooses which I/O cost solution (identified by named string) should be used for the devices in this system. the known solutions can be queried from the udev metadata attached to the devices. if a device does not have the specified solution, the first one listed in IOCOST_SOLUTIONS is used instead. e.g. "TargetSolution=isolated-bandwidth". added in version 254. ๐Ÿ‘‘

๐Ÿฆ‹ SEE ALSO ๐Ÿฆ‹

  • udevadm(8)
  • The iocost-benchmarks github project[1]
  • The resctl-bench documentation details how the values are obtained[3]

๐Ÿ’– NOTES ๐Ÿ’–

  1. iocost-benchmark โ€” https://github.com/iocost-benchmark/iocost-benchmarks
  2. ๐Ÿ’ฃ๐Ÿ’ฅ๐Ÿงจ๐Ÿ’ฅ๐Ÿ’ฅ๐Ÿ’ฃ Please note that those configuration files must be available at all times. If /usr/local/ is a separate partition, it may not be available during early boot, and must not be used for configuration.
this one is not a drill bestie, that's a literal bomb emoji warning in the original and I am passing it along with full respect. do NOT put your config on a partition that might not be there yet. ๐Ÿ˜ญ
  1. The resctl-bench documentation details how the values are obtained โ€” https://github.com/facebookexperimental/resctl-demo/tree/main/resctl-bench/doc

and that's the whole page, you ate it, I'm obsessed. ๐Ÿซถโœจ this was written against systemd 262.1 โ€” mwah, go configure responsibly, bestie ๐Ÿ’…๐ŸŽ€

๐Ÿ“ฆ where this page comes from
  • arch rolling: systemd 262.1-1 ยท LGPL-2.1-or-later AND CC0-1.0 AND GPL-2.0-or-later AND MIT-0
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms