237 lines
6.3 KiB
HTML
237 lines
6.3 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of IONICE</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>IONICE</H1>
|
|
Section: User Commands (1)<BR>Updated: July 2011<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
ionice - set or get process I/O scheduling class and priority
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>ionice</B>
|
|
|
|
[<B>-c</B>
|
|
|
|
<I>class</I>]
|
|
|
|
[<B>-n</B>
|
|
|
|
<I>level</I>]
|
|
|
|
[<B>-t</B>]
|
|
|
|
<B>-p</B>
|
|
|
|
<I>PID</I>...
|
|
|
|
<BR>
|
|
|
|
<B>ionice</B>
|
|
|
|
[<B>-c</B>
|
|
|
|
<I>class</I>]
|
|
|
|
[<B>-n</B>
|
|
|
|
<I>level</I>]
|
|
|
|
[<B>-t</B>]
|
|
|
|
<B>-P</B>
|
|
|
|
<I>PGID</I>...
|
|
|
|
<BR>
|
|
|
|
<B>ionice</B>
|
|
|
|
[<B>-c</B>
|
|
|
|
<I>class</I>]
|
|
|
|
[<B>-n</B>
|
|
|
|
<I>level</I>]
|
|
|
|
[<B>-t</B>]
|
|
|
|
<B>-u</B>
|
|
|
|
<I>UID</I>...
|
|
|
|
<BR>
|
|
|
|
<B>ionice</B>
|
|
|
|
[<B>-c</B>
|
|
|
|
<I>class</I>]
|
|
|
|
[<B>-n</B>
|
|
|
|
<I>level</I>]
|
|
|
|
[<B>-t</B>]
|
|
|
|
<I>command </I>[<I>argument</I>...]
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
This program sets or gets the I/O scheduling class and priority for a program.
|
|
If no arguments or just <B>-p</B> is given, <B>ionice</B> will query the current
|
|
I/O scheduling class and priority for that process.
|
|
<P>
|
|
When <I>command</I> is given,
|
|
<B>ionice</B>
|
|
|
|
will run this command with the given arguments.
|
|
If no <I>class</I> is specified, then
|
|
<I>command</I>
|
|
|
|
will be executed with the "best-effort" scheduling class. The default
|
|
priority level is 4.
|
|
<P>
|
|
As of this writing, a process can be in one of three scheduling classes:
|
|
<DL COMPACT>
|
|
<DT id="1"><B>Idle</B><DD>
|
|
A program running with idle I/O priority will only get disk time when no other
|
|
program has asked for disk I/O for a defined grace period. The impact of an
|
|
idle I/O process on normal system activity should be zero. This scheduling
|
|
class does not take a priority argument. Presently, this scheduling class
|
|
is permitted for an ordinary user (since kernel 2.6.25).
|
|
<DT id="2"><B>Best-effort</B><DD>
|
|
This is the effective scheduling class for any process that has not asked for
|
|
a specific I/O priority.
|
|
This class takes a priority argument from <I>0-7</I>, with a lower
|
|
number being higher priority. Programs running at the same best-effort
|
|
priority are served in a round-robin fashion.
|
|
<P>
|
|
Note that before kernel 2.6.26 a process that has not asked for an I/O priority
|
|
formally uses "<B>none</B>" as scheduling class, but the I/O scheduler will treat
|
|
such processes as if it were in the best-effort class. The priority within the
|
|
best-effort class will be dynamically derived from the CPU nice level of the
|
|
process: io_priority = (cpu_nice + 20) / 5.
|
|
<P>
|
|
For kernels after 2.6.26 with the CFQ I/O scheduler, a process that has not asked
|
|
for an I/O priority inherits its CPU scheduling class. The I/O priority is derived
|
|
from the CPU nice level of the process (same as before kernel 2.6.26).
|
|
<P>
|
|
<DT id="3"><B>Realtime</B><DD>
|
|
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. As with the best-effort class,
|
|
8 priority levels are defined denoting how big a time slice a given process
|
|
will receive on each scheduling window. This scheduling class is not
|
|
permitted for an ordinary (i.e., non-root) user.
|
|
</DL>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="4"><B>-c</B>,<B> --class </B><I>class</I>
|
|
|
|
<DD>
|
|
Specify the name or number of the scheduling class to use; <I>0</I> for none,
|
|
<I>1</I> for realtime, <I>2</I> for best-effort, <I>3</I> for idle.
|
|
<DT id="5"><B>-n</B>,<B> --classdata </B><I>level</I>
|
|
|
|
<DD>
|
|
Specify the scheduling class data. This only has an effect if the class
|
|
accepts an argument. For realtime and best-effort, <I>0-7</I> are valid data
|
|
(priority levels), and <I>0</I> represents the highest priority level.
|
|
<DT id="6"><B>-p</B>,<B> --pid </B><I>PID</I>...
|
|
|
|
<DD>
|
|
Specify the process IDs of running processes for which to get or set the
|
|
scheduling parameters.
|
|
<DT id="7"><B>-P</B>,<B> --pgid </B><I>PGID</I>...
|
|
|
|
<DD>
|
|
Specify the process group IDs of running processes for which to get or set the
|
|
scheduling parameters.
|
|
<DT id="8"><B>-t</B>,<B> --ignore</B>
|
|
|
|
<DD>
|
|
Ignore failure to set the requested priority. If <I>command</I> was specified,
|
|
run it even in case it was not possible to set the desired scheduling priority,
|
|
which can happen due to insufficient privileges or an old kernel version.
|
|
<DT id="9"><B>-h</B>,<B> --help</B>
|
|
|
|
<DD>
|
|
Display help text and exit.
|
|
<DT id="10"><B>-u</B>,<B> --uid </B><I>UID</I>...
|
|
|
|
<DD>
|
|
Specify the user IDs of running processes for which to get or set the
|
|
scheduling parameters.
|
|
<DT id="11"><B>-V</B>,<B> --version</B>
|
|
|
|
<DD>
|
|
Display version information and exit.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
<P>
|
|
|
|
<DL COMPACT>
|
|
<DT id="12"># <B>ionice</B> -c 3 -p 89<DD>
|
|
<DT id="13">Sets process with PID 89 as an idle I/O process.<DD>
|
|
<DT id="14"># <B>ionice</B> -c 2 -n 0 bash<DD>
|
|
<DT id="15">Runs 'bash' as a best-effort program with highest priority.<DD>
|
|
<DT id="16"># <B>ionice</B> -p 89 91<DD>
|
|
<DT id="17">Prints the class and priority of the processes with PID 89 and 91.<DD>
|
|
</DL>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>NOTES</H2>
|
|
|
|
Linux supports I/O scheduling priorities and classes since 2.6.13 with the CFQ
|
|
I/O scheduler.
|
|
<A NAME="lbAH"> </A>
|
|
<H2>AUTHORS</H2>
|
|
|
|
<PRE>
|
|
Jens Axboe <<A HREF="mailto:jens@axboe.dk">jens@axboe.dk</A>>
|
|
Karel Zak <<A HREF="mailto:kzak@redhat.com">kzak@redhat.com</A>>
|
|
</PRE>
|
|
|
|
<A NAME="lbAI"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+ioprio_set">ioprio_set</A></B>(2)
|
|
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>AVAILABILITY</H2>
|
|
|
|
The ionice command is part of the util-linux package and is available from
|
|
<A HREF="https://www.kernel.org/pub/linux/utils/util-linux/.">https://www.kernel.org/pub/linux/utils/util-linux/.</A>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="18"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="19"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="20"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="21"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="22"><A HREF="#lbAF">EXAMPLES</A><DD>
|
|
<DT id="23"><A HREF="#lbAG">NOTES</A><DD>
|
|
<DT id="24"><A HREF="#lbAH">AUTHORS</A><DD>
|
|
<DT id="25"><A HREF="#lbAI">SEE ALSO</A><DD>
|
|
<DT id="26"><A HREF="#lbAJ">AVAILABILITY</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:17 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|