blob: 4864a9941bd108d327fa611f352b7688e4007533 [file] [log] [blame]
.TH TUNA "8" "February 2010" "tuna" "System Administration Utilities"
tuna \- program for tuning running processes
.B tuna
This manual page explains the \fBtuna\fR program. The program can be used to change the attributes of application and kernel threads. The \fBtuna\fR can operate on IRQs by name or number, and tasks or threads by process ID or command-line. CPUs and sets of CPUs can be specified by CPU or socket number. IRQ names and process command-lines can include wildcards.
\fBtuna\fP can change scheduling policy, scheduler priority and processor affinity for processes and process threads. \fBtuna\fR can also change the processor affinity for interrupts.
When \fBtuna\fR is invoked without any options it starts up in its graphical interface mode. This manual page explains only the command\-line options for \fBtuna\fR
\fBtuna\fR has both \fIaction\fR options and \fImodifier\fR options. Modifier options must be specified on the command\-line before the actions they are intended to modify. Any modifier option applies to following actions on the same command-line until it is over-ridden.
.IP \fIActions\fR
\fB\-h\fR, \fB\-\-help\fR
Print a list of options. \fBtuna\fR will exit after this action, ignoring the remainder of the command-line.
\fB\-g\fR, \fB\-\-gui\fR
Start the GUI. Actions that follow this on the command-line will be processed without waiting for the GUI to complete.
\fB\-a\fR, \fB\-\-config_file_apply=profilename\fR
Apply changes described in profile
\fB\-l\fR, \fB\-\-config_file_list\fR
List preloaded profiles
\fB\-i\fR, \fB\-\-isolate\fR
Move all threads away from CPU\-LIST. Requires \fB\-c\fR or \fB-S\fR.
\fB\-I\fR, \fB\-\-include\fR
Allow all threads to run on CPU\-LIST. Requires \fB\-c\fR or \fB-S\fR.
\fB\-m\fR, \fB\-\-move\fR
Move selected entities to CPU\-LIST. Requires \fB\-c\fR and either \fB-t\fR or \fB-q\fR.
\fB\-p\fR, \fB\-\-priority\fR=\fI[POLICY:]\fRRTPRIO
Set thread scheduler tunables: POLICY and RTPRIO. POLICY is one of OTHER, FIFO, RR, or BATCH. Requires \fB\-t\fR.
\fB\-P\fR, \fB\-\-show_threads\fR
Show thread list.
\fB\-s\fR, \fB\-\-save\fR=\fIFILENAME\fR
Save kthreads sched tunables to FILENAME.
\fB\-v\fR, \fB\-\-version\fR
Show version
\fB\-W\fR, \fB\-\-what_is\fR
Provides help about selected entities. Requires \fB-t\fR.
\fB\-x\fR, \fB\-\-spread\fR
Spread selected entities over CPU\-LIST. Requires at least one of \fB-t\fR or \fB-q\fR. The specified threads and IRQs are each assigned to one cpu in CPU\-LIST.
.IP \fIModifiers\fR
\fB\-c\fR, \fB\-\-cpus\fR=\fICPU\-LIST\fR
CPU\-LIST affected by commands. Requires a CPU number or a comma-separated list of CPU numbers.
\fB\-C\fR, \fB\-\-affect_children\fR
Operation will affect children threads.
\fB\-f\fR, \fB\-\-filter\fR
Disable display of selected CPUs in \fB--gui\fR. Requires \fB-c\R.
\fB\-G\fR, \fB\-\-cgroup\fR
Display the processes with the type of cgroups they are in. Requires \fB-P\R.
\fB\-K\fR, \fB\-\-no_kthreads\fR
Operations will not affect kernel threads.
\fB\-q\fR, \fB\-\-irqs\fR=\fIIRQ\-LIST\fR
IRQ\-LIST affected by commands. Requires an IRQ number or a comma-separated list of IRQ numbers.
\fB\-S\fR, \fB\-\-sockets\fR=\fICPU\-SOCKET\-LIST\fR
CPU\-SOCKET\-LIST affected by commands. Requires a socket number or a comma-separated list of socket numbers.
\fB\-t\fR, \fB\-\-threads\fR=\fITHREAD\-LIST\fR
THREAD\-LIST affected by commands. Requires a thread number or thread name, or a comma-separated list of thread numbers and/or names. Thread names may contain wildcards. Be sure to quote or escape any wildcard specifications.
\fB\-U\fR, \fB\-\-no_uthreads\fR
Operations will not affect user threads.
If for instance the Ethernet NICs have multiple queues for both receive and transmit, each with its own IRQ, the Ethernet IRQs can be associated with a CPU socket:
.B tuna -S 2 -i -q 'eth*' -x
Move everything off the CPUs in socket 2, then spread the IRQs for the Ethernet devices acrross those same CPUs.