1ionice(1) General Commands Manual ionice(1)
2
3
4
6 ionice - get/set program io scheduling class and priority
7
9 ionice [-c] [-n] [-p] [COMMAND [ARG...]]
10
11
13 This program sets the io scheduling class and priority for a program.
14 As of this writing, Linux supports 3 scheduling classes:
15
16 Idle. A program running with idle io priority will only get disk time
17 when no other program has asked for disk io for a defined grace period.
18 The impact of idle io processes on normal system activity should be
19 zero. This scheduling class does not take a priority argument.
20
21 Best effort. This is the default scheduling class for any process that
22 hasn't asked for a specific io priority. Programs inherit the CPU nice
23 setting for io priorities. This class takes a priority argument from
24 0-7, with lower number being higher priority. Programs running at the
25 same best effort priority are served in a round-robin fashion.
26
27 Real time. The RT scheduling class is given first access to the disk,
28 regardless of what else is going on in the system. Thus the RT class
29 needs to be used with some care, as it can starve other processes. As
30 with the best effort class, 8 priority levels are defined denoting how
31 big a time slice a given process will receive on each scheduling win‐
32 dow.
33
34 If no arguments or just -p is given, ionice will query the current io
35 scheduling class and priority for that process.
36
37
39 -c The scheduling class. 1 for real time, 2 for best-effort, 3 for
40 idle.
41
42 -n The scheduling class data. This defines the class data, if the
43 class accepts an argument. For real time and best-effort, 0-7 is
44 valid data.
45
46 -p Pass in a process pid to change an already running process. If
47 this argument is not given, ionice will run the listed program
48 with the given parameters.
49
50
52 # ionice -c3 -p89
53
54 Sets process with PID 89 as an idle io process.
55
56 # ionice -c2 -n0 bash
57
58 Runs 'bash' as a best-effort program with highest priority.
59
60 # ionice -p89
61
62 Returns the class and priority of the process with PID 89.
63
64
66 Linux supports io scheduling priorities and classes since 2.6.13 with
67 the CFQ io scheduler.
68
69
71 Jens Axboe <axboe@suse.de>
72
73
74
75ionice August 2005 ionice(1)