]> git.ipfire.org Git - thirdparty/util-linux.git/blob - schedutils/ionice.1
ionice: Extend the man page to explain the "none" class and cpu-nice inheritance
[thirdparty/util-linux.git] / schedutils / ionice.1
1 .TH ionice "1" "August 2005" ionice
2 .SH NAME
3 ionice \- get/set program io scheduling class and priority
4 .SH SYNOPSIS
5 .BI "ionice [[\-c " class "] [\-n " classdata " ] [\-t]] \-p " PID " [" PID " ...]"
6
7 .BI "ionice [\-c " class "] [\-n " classdata " ] [\-t] COMMAND [ARG ...]"
8
9 .SH DESCRIPTION
10 This program sets or gets the io scheduling class and priority for a program.
11 If no arguments or just \fI-p\fR is given, \fIionice\fR will query the current
12 io scheduling class and priority for that process.
13
14 As of this writing, a process can be in one of four scheduling classes:
15
16 .IP "\fBIdle\fP"
17 A program running with idle io priority will only get disk time when no other
18 program has asked for disk io for a defined grace period. The impact of idle
19 io processes on normal system activity should be zero. This scheduling
20 class does not take a priority argument. Presently, this scheduling class
21 is permitted for an ordinary user (since kernel 2.6.25).
22
23 .IP "\fBBest effort\fP"
24 This is the effective scheduling class for any process that hasn't asked for
25 a specific io priority.
26 This class takes a priority argument from \fI0-7\fR, with lower
27 number being higher priority. Programs running at the same best effort
28 priority are served in a round-robin fashion.
29
30 .IP "\fBReal time\fP"
31 The RT scheduling class is given first access to the disk, regardless of
32 what else is going on in the system. Thus the RT class needs to be used with
33 some care, as it can starve other processes. As with the best effort class,
34 8 priority levels are defined denoting how big a time slice a given process
35 will receive on each scheduling window. This scheduling class is not
36 permitted for an ordinary (i.e., non-root) user.
37
38 .IP "\fBNone\fP"
39 A process that that hasn't asked for a specific io priority will formally be
40 in this class. The io scheduler will treat a process that is in this class as
41 if it were in the best effort class. The priority within the best effort
42 class will be dynamically derived from the cpu nice level of the process:
43 io_priority = (cpu_nice + 20) / 5
44
45
46 .SH OPTIONS
47 .IP "\fB-c \fIclass\fP"
48 The scheduling class. \fI1\fR for real time, \fI2\fR for best-effort, \fI3\fR for idle.
49 .IP "\fB-n \fIclassdata\fP"
50 The scheduling class data. This defines the class data, if the class
51 accepts an argument. For real time and best-effort, \fI0-7\fR is valid
52 data.
53 .IP "\fB-p \fIpid\fP"
54 Pass in process PID(s) to view or change already running processes. If this argument
55 is not given, \fBionice\fP will run the listed program with the given
56 parameters.
57 .IP "\fB-t\fP"
58 Ignore failure to set requested priority. If COMMAND or PID(s) is specified, run it
59 even in case it was not possible to set desired scheduling priority, what
60 can happen due to insufficient privilegies or old kernel version.
61
62 .SH EXAMPLES
63 .LP
64 .TP 7
65 # \fBionice\fP -c 3 -p 89
66 .TP 7
67 Sets process with PID 89 as an idle io process.
68 .TP 7
69 # \fBionice\fP -c 2 -n 0 bash
70 .TP 7
71 Runs 'bash' as a best-effort program with highest priority.
72 .TP 7
73 # \fBionice\fP -p 89 91
74 .TP 7
75 Prints the class and priority of the processes with PID 89 and 91.
76
77 .SH NOTES
78 Linux supports io scheduling priorities and classes since 2.6.13 with the CFQ
79 io scheduler.
80
81 .SH AUTHORS
82 Jens Axboe <axboe@suse.de>
83
84 .SH AVAILABILITY
85 The ionice command is part of the util-linux-ng package and is available from
86 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.