1TUNA(8) System Administration Utilities TUNA(8)
2
3
4
6 tuna - program for tuning running processes
7
9 tuna [OPTIONS]
10
12 This manual page explains the tuna program. The program can be used to
13 change the attributes of application and kernel threads. tuna can oper‐
14 ate on IRQs by name or number, and tasks or threads by process ID or
15 command-line. CPUs and sets of CPUs can be specified by CPU or socket
16 number. IRQ names and process command-lines can include wildcards.
17
18 tuna can change scheduling policy, scheduler priority and processor
19 affinity for processes and process threads. tuna can also change the
20 processor affinity for interrupts. When tuna is invoked without any
21 options it starts up in its graphical interface mode. This manual page
22 explains only the command-line options for tuna
23
25 tuna has both action options and modifier options. Modifier options
26 must be specified on the command-line before the actions they are in‐
27 tended to modify. Any modifier option applies to following actions on
28 the same command-line until it is over-ridden.
29
30 Actions
31
32 -h, --help
33 Print a list of options. tuna will exit after this action, ig‐
34 noring the remainder of the command-line.
35
36 -g, --gui
37 Start the GUI. Actions that follow this on the command-line will
38 be processed without waiting for the GUI to complete.
39
40 -a, --config_file_apply=profilename
41 Apply changes described in profile
42
43 -l, --config_file_list
44 List preloaded profiles
45
46 -i, --isolate
47 Move all threads away from CPU-LIST. Requires -c or -S.
48
49 -I, --include
50 Allow all threads to run on CPU-LIST. Requires -c or -S.
51
52 -m, --move
53 Move selected entities to CPU-LIST. Requires -c and either -t or
54 -q.
55
56 -p, --priority=[POLICY:]RTPRIO
57 Set thread scheduler tunables: POLICY and RTPRIO. POLICY is one
58 of OTHER, FIFO, RR, or BATCH. If -t is not set, -p will act as a
59 Modifier saving the sched tunables for future Actions, for exam‐
60 ple -r.
61
62 -P, --show_threads
63 Show thread list.
64
65 -r, --run="COMMAND"
66 Run the COMMAND. If arguments are passed, the entire command
67 line must be provided inside "quotes". Modifiers -c and -p can
68 be used to set the affinity and scheduler tunables of the given
69 COMMAND. The arg[0] (i.e. the command) will be set in
70 THREAD-LIST. Likewise the -t, the COMMAND accepts the prefix +
71 and - as wildcards in order to be appended or removed from
72 THREAD-LIST, respectively.
73
74 -R, --refresh=MSEC
75 Refresh the GUI every MSEC milliseconds
76
77 -s, --save=FILENAME
78 Save kthreads sched tunables to FILENAME.
79
80 -v, --version
81 Show version
82
83 -W, --what_is
84 Provides help about selected entities. Requires -t.
85
86 -x, --spread
87 Spread selected entities over CPU-LIST. Requires at least one of
88 -t or -q. The specified threads and IRQs are each assigned to
89 one cpu in CPU-LIST.
90
91 Modifiers
92
93 -c, --cpus=CPU-LIST
94 CPU-LIST affected by commands. Requires a CPU number or a comma-
95 separated list of CPU numbers.
96
97 -C, --affect_children
98 Operation will affect children threads.
99
100 -d, --disable_perf
101 Explicitly disable usage of perf in GUI for process view
102
103 -f, --filter
104 Disable display of selected CPUs in --gui. Requires -c
105
106 -G, --cgroup
107 Display the processes with the type of cgroups they are in. Re‐
108 quires -P
109
110 -K, --no_kthreads
111 Operations will not affect kernel threads.
112
113 -q, --irqs=IRQ-LIST
114 IRQ-LIST affected by commands. Requires an IRQ number or a
115 comma-separated list of IRQ numbers.
116
117 -S, --sockets=CPU-SOCKET-LIST
118 CPU-SOCKET-LIST affected by commands. Requires a socket number
119 or a comma-separated list of socket numbers.
120
121 -t, --threads=THREAD-LIST
122 THREAD-LIST affected by commands. Requires a thread number or
123 thread name, or a comma-separated list of thread numbers and/or
124 names. Thread names may contain wildcards. Be sure to quote or
125 escape any wildcard specifications. If only - is passed as argu‐
126 ment, the THREAD-LIST will be cleared.
127
128 -U, --no_uthreads
129 Operations will not affect user threads.
130
132 If for instance the Ethernet NICs have multiple queues for both receive
133 and transmit, each with its own IRQ, the Ethernet IRQs can be associ‐
134 ated with a CPU socket:
135
136 tuna -S 2 -i -q 'eth*' -x
137
138 Move everything off the CPUs in socket 2, then spread the IRQs
139 for the Ethernet devices across those same CPUs.
140
141
142
143tuna February 2010 TUNA(8)