Set disk I/O priority with ionice

Push backups, indexing and file scans into the idle I/O class so interactive work never stutters.

LinuxProcessesdiskio-priorityMedium risk
Run sudo ionice -c 3 -p PID to demote a running job to idle I/O class, or start it as ionice -c 3 tar -czf backup.tar.gz ~/Documents.

01Command

Command
$ sudo ionice -c 3 -p $(pidof updatedb)

02What it does

ionice assigns one of three I/O scheduling classes: 1 realtime, 2 best-effort (the default) and 3 idle. An idle-class process only touches the disk when no other process wants it, which is perfect for backups and updatedb index runs. You can apply it to a running PID with -p or wrap a new command.

03Risk

RiskMedium risk
Requirementsionice ships with util-linux on all major distros. I/O priority classes require the CFQ/BFQ scheduler; under none/mq-deadline the hint may have no effect.
!Warning: I/O priority only takes effect with schedulers that honor it (CFQ/BFQ); modern kernels using none or mq-deadline largely ignore ionice. Class 1 realtime can starve the rest of the system, so avoid it except for genuine streaming workloads.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • ionice(1) — Arch Manual Pages
    Arch Linux · community · 2026-09-17
    Evidence: Shows ionice [-c class] [-n level] [-t] -p pid usage and describes the idle class which only gets disk time when nobody else needs it.
  • ionice(1) — Debian bookworm
    Debian Manpages · community · 2026-09-17
    Evidence: SYNOPSIS ionice [-c class] [-n level] [-t] -p PID and options --class, --classdata, --pid are documented, including class 3 = idle.

Last verified: 2026-09-19 · Category: System & Settings

06Related solutions