ionice
gets or sets the I/O scheduling class and priority for a process
TLDR
Run command with specific I/O class and priority
SYNOPSIS
ionice [options] [command]
DESCRIPTION
ionice gets or sets the I/O scheduling class and priority for a process. This controls how disk I/O requests are scheduled relative to other processes.
Scheduling classes:
- Realtime (1) - Highest priority, guaranteed I/O access (requires root)
- Best-effort (2) - Default class, shares I/O fairly based on priority
- Idle (3) - Only gets I/O time when no other process needs it
PARAMETERS
-c, --class CLASS
Scheduling class: 1 (realtime), 2 (best-effort), 3 (idle)-n, --classdata LEVEL
Priority level within class: 0 (highest) to 7 (lowest)-p, --pid PID
Apply to process with given PID-P, --pgid PGID
Apply to process group-u, --uid UID
Apply to all processes owned by user-t, --ignore
Ignore failures to set priority
CAVEATS
Only works with the CFQ (Completely Fair Queuing) I/O scheduler. Realtime class requires root privileges. BFQ and mq-deadline schedulers have different priority semantics.
HISTORY
ionice was introduced as part of util-linux to provide user control over the CFQ I/O scheduler's prioritization features, which were added to the Linux kernel in version 2.6.13 (2005).
