1IONICE(1)                        User Commands                       IONICE(1)
2
3
4

NAME

6       ionice - set or get process I/O scheduling class and priority
7

SYNOPSIS

9       ionice [-c class] [-n level] [-t] -p PID...
10       ionice [-c class] [-n level] [-t] command [argument...]
11

DESCRIPTION

13       This  program  sets or gets the I/O scheduling class and priority for a
14       program.  If no arguments or just -p is given, ionice  will  query  the
15       current I/O scheduling class and priority for that process.
16
17       When  command  is  given,  ionice  will run this command with the given
18       arguments.  If no class is specified, then  command  will  be  executed
19       with the "best-effort" scheduling class.  The default priority level is
20       4.
21
22       As of this writing, a  process  can  be  in  one  of  three  scheduling
23       classes:
24
25       Idle   A program running with idle I/O priority will only get disk time
26              when no other program has asked for disk I/O for a defined grace
27              period.   The  impact  of  an  idle I/O process on normal system
28              activity should be zero.  This scheduling class does not take  a
29              priority  argument.  Presently, this scheduling class is permit‐
30              ted for an ordinary user (since kernel 2.6.25).
31
32       Best-effort
33              This is the effective scheduling class for any process that  has
34              not  asked for a specific I/O priority.  This class takes a pri‐
35              ority argument from 0-7, with a lower number being higher prior‐
36              ity.   Programs  running  at  the  same best-effort priority are
37              served in a round-robin fashion.
38
39              Note that before kernel 2.6.26 a process that has not asked  for
40              an  I/O  priority  formally uses "none" as scheduling class, but
41              the I/O scheduler will treat such processes as if it were in the
42              best-effort  class.   The  priority within the best-effort class
43              will be dynamically derived from  the  CPU  nice  level  of  the
44              process: io_priority = (cpu_nice + 20) / 5.
45
46              For  kernels  after 2.6.26 with the CFQ I/O scheduler, a process
47              that has not asked for an I/O priority inherits its CPU schedul‐
48              ing  class.  The I/O priority is derived from the CPU nice level
49              of the process (same as before kernel 2.6.26).
50
51
52       Realtime
53              The RT scheduling class is  given  first  access  to  the  disk,
54              regardless  of what else is going on in the system.  Thus the RT
55              class needs to be used with some care, as it  can  starve  other
56              processes.  As with the best-effort class, 8 priority levels are
57              defined denoting how big a  time  slice  a  given  process  will
58              receive on each scheduling window.  This scheduling class is not
59              permitted for an ordinary (i.e., non-root) user.
60

OPTIONS

62       -c, --class class
63              Specify the name or number of the scheduling class to use; 0 for
64              none, 1 for realtime, 2 for best-effort, 3 for idle.
65
66       -n, --classdata level
67              Specify  the  scheduling class data.  This only has an effect if
68              the class accepts an argument.  For  realtime  and  best-effort,
69              0-7 are valid data (priority levels).
70
71       -p, --pid PID...
72              Specify the process IDs of running processes for which to get or
73              set the scheduling parameters.
74
75       -t, --ignore
76              Ignore failure to set the requested priority.   If  command  was
77              specified,  run  it  even in case it was not possible to set the
78              desired scheduling priority, which can happen  due  to  insuffi‐
79              cient privileges or an old kernel version.
80
81       -h, --help
82              Display help and exit.
83
84       -V, --version
85              Display version information and exit.
86

EXAMPLES

88       # ionice -c 3 -p 89
89
90       Sets process with PID 89 as an idle I/O process.
91
92       # ionice -c 2 -n 0 bash
93
94       Runs 'bash' as a best-effort program with highest priority.
95
96       # ionice -p 89 91
97
98       Prints the class and priority of the processes with PID 89 and 91.
99

NOTES

101       Linux  supports I/O scheduling priorities and classes since 2.6.13 with
102       the CFQ I/O scheduler.
103

AUTHORS

105       Jens Axboe <jens@axboe.dk>
106       Karel Zak <kzak@redhat.com>
107

AVAILABILITY

109       The ionice command is part of the util-linux package and  is  available
110       from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
111
112
113
114util-linux                         July 2011                         IONICE(1)
Impressum