The ionice command is used to set I/O scheduling class and priority for a program.
The I/O schedule for a program can be changed to the following:
- CFQ
- Noop scheduler
- Anticipatory
- Deadline
The current Disk Scheduler can be viewed from
root@twenty ~]# cat /sys/block/sd[ab]/queue/scheduler
noop anticipatory deadline [cfq]
The current scheduler can be changed by
[root@twenty queue]# echo anticipatory> scheduler
[root@twenty queue]# cat /sys/block/sda/queue/scheduler
noop [anticipatory] deadline cfq
Ionice Utility
The ionice sets the io scheduling class and priority for a program or script. It supports the following three scheduling classes
- Idle: A program running with idle io priority will only get disk time when no other program has asked for disk io for a defined grace period. Number-3
- Best effort: This is the default scheduling class for any process that hasn’t asked for a specific io priority. Programs inherit the CPU nice setting for io priorities. This class takes a priority argument from 0-7, with a lower number being a higher priority. Number- 2
- Real-time: The RT scheduling class is given first access to the disk, regardless of what else is going on in the system. Thus the RT class needs to be used with some care, as it can starve other processes. Number -1
Setting ionice for a pid ( number 3 specifies the scheduling class)
ionice -c3 -p 1004
If you require help, contact SupportPRO Server Admin
Partner with SupportPRO for 24/7 proactive cloud support that keeps your business secure, scalable, and ahead of the curve.

