1TUNA(8)                 System Administration Utilities                TUNA(8)
2
3
4

NAME

6       tuna - program for tuning running processes
7

SYNOPSIS

9       tuna [OPTIONS]
10

DESCRIPTION

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

GLOBAL OPTIONS

25       -h, --help
26              Print  a  list of options. tuna will exit after this action, ig‐
27              noring the remainder of the command-line.
28
29       -v, --version
30              Show version
31
32       -L, --logging=LOG-LEVEL
33              Log application details to file for given LOG-LEVEL
34
35       -D, --debug
36              Print DEBUG level logging details to console
37

COMMANDS

39       tuna isolate
40              usage: tuna-cmd.py isolate [-h] (-c CPU-LIST  |  -S  CPU-SOCKET-
41              LIST | -N)
42
43              Move  all  allowed threads and IRQs away from CPU-LIST. Requires
44              -c, -S, or -N.
45
46              optional arguments:
47                -h, --help            show this help message and exit
48                -c CPU-LIST, --cpus CPU-LIST
49                                      CPU-LIST affected by commands
50                -S CPU-SOCKET-LIST, --sockets CPU-SOCKET-LIST
51                                      CPU-SOCKET-LIST affected by commands
52                -N, --nohz_full       CPUs in nohz_full  kernel  command  line
53              will be affected
54                                      by operations
55
56       tuna include
57              usage:  tuna-cmd.py  include  [-h] (-c CPU-LIST | -S CPU-SOCKET-
58              LIST | -N)
59
60              Allow all allowed threads and IRQs to run on CPU-LIST.  Requires
61              -c, -S, or -N.
62
63              optional arguments:
64                -h, --help            show this help message and exit
65                -c CPU-LIST, --cpus CPU-LIST
66                                      CPU-LIST affected by commands
67                -S CPU-SOCKET-LIST, --sockets CPU-SOCKET-LIST
68                                      CPU-SOCKET-LIST affected by commands
69                -N,  --nohz_full        CPUs  in nohz_full kernel command line
70              will be affected
71                                      by operations
72
73       tuna move
74              usage: tuna-cmd.py move [-h] (-c CPU-LIST | -S CPU-SOCKET-LIST |
75              -N)
76                                      [-t THREAD-LIST] [-q IRQ-LIST]
77
78              Move  selected  entities to CPU-LIST. Requires -c, -S, or -N and
79              -t or -q.
80
81              optional arguments:
82                -h, --help            show this help message and exit
83                -c CPU-LIST, --cpus CPU-LIST
84                                      CPU-LIST affected by commands
85                -S CPU-SOCKET-LIST, --sockets CPU-SOCKET-LIST
86                                      CPU-SOCKET-LIST affected by commands
87                -N, --nohz_full       CPUs in nohz_full  kernel  command  line
88              will be affected
89                                      by operations
90                -t THREAD-LIST, --threads THREAD-LIST
91                                      THREAD-LIST affected by commands
92                -q IRQ-LIST, --irqs IRQ-LIST
93                                      IRQ-LIST affect by commands
94
95       tuna spread
96              usage: tuna-cmd.py spread [-h] (-c CPU-LIST | -S CPU-SOCKET-LIST
97              | -N)
98                                        [-t THREAD-LIST] [-q IRQ-LIST]
99
100              Spread selected entities over CPU-LIST.  The  specified  threads
101              and  IRQs are each assigned to one cpu in CPU-LIST. Requires -c,
102              -S, or -N and -t or -q.
103
104
105              optional arguments:
106                -h, --help            show this help message and exit
107                -c CPU-LIST, --cpus CPU-LIST
108                                      CPU-LIST affected by commands
109                -S CPU-SOCKET-LIST, --sockets CPU-SOCKET-LIST
110                                      CPU-SOCKET-LIST affected by commands
111                -N, --nohz_full       CPUs in nohz_full  kernel  command  line
112              will be affected
113                                      by operations
114                -t THREAD-LIST, --threads THREAD-LIST
115                                      THREAD-LIST affected by commands
116                -q IRQ-LIST, --irqs IRQ-LIST
117                                      IRQ-LIST affect by commands
118
119
120       tuna priority
121              usage:  tuna-cmd.py priority [-h] -t THREAD-LIST [-C] POLICY:RT‐
122              PRIO
123
124              Set thread scheduler tunables: POLICY and RTPRIO. POLICY is  one
125              of  OTHER,  FIFO,  RR, or BATCH. Provide POLICY, RTPRIO, or POL‐
126              ICY:RTPRIO separated by ":". If only POLICY is set, the RT  pri‐
127              ority will default to 1 if the policy is RT, and 0 otherwise. If
128              only RTPRIO is specified, policy will not be changed.
129
130              positional arguments:
131                POLICY:RTPRIO         Set thread  scheduler  tunables:  POLICY
132              and RTPRIO
133
134              optional arguments:
135                -h, --help            show this help message and exit
136                -t THREAD-LIST, --threads THREAD-LIST
137                                      THREAD-LIST affected by commands
138                -C, --affect_children
139                                      Operation will affect children threads
140
141       tuna run
142              usage:  tuna-cmd.py run [-h] [-c CPU-LIST | -S CPU-SOCKET-LIST |
143              -N]
144                                     [-p PRIORITY] [-b]
145                                     COMMAND
146
147              Run the COMMAND. The entire command line must be provided inside
148              "quotes".  Modifiers -c, -S and -p can be used to set the affin‐
149              ity and scheduler tunables of the given COMMAND.
150
151              positional arguments:
152                COMMAND               fork a new process and run the "COMMAND"
153
154              optional arguments:
155                -h, --help            show this help message and exit
156                -c CPU-LIST, --cpus CPU-LIST
157                                      CPU-LIST affected by commands
158                -S CPU-SOCKET-LIST, --sockets CPU-SOCKET-LIST
159                                      CPU-SOCKET-LIST affected by commands
160                -N, --nohz_full       CPUs in nohz_full  kernel  command  line
161              will be affected
162                                      by operations
163                -p PRIORITY, --priority PRIORITY
164                                      Set  thread  scheduler  tunables: POLICY
165              and RTPRIO
166                -b, --background      Run command as background task
167
168
169       tuna save
170              usage: tuna-cmd.py save [-h] [-c CPU-LIST | -S CPU-SOCKET-LIST |
171              -N]
172                                      [-t THREAD-LIST]
173                                      FILENAME
174
175              Save kthreads sched tunables to FILENAME
176
177              positional arguments:
178                FILENAME               Save  kthreads  sched  tunables to this
179              file
180
181              optional arguments:
182                -h, --help            show this help message and exit
183                -c CPU-LIST, --cpus CPU-LIST
184                                      CPU-LIST affected by commands
185                -S CPU-SOCKET-LIST, --sockets CPU-SOCKET-LIST
186                                      CPU-SOCKET-LIST affected by commands
187                -N, --nohz_full       CPUs in nohz_full  kernel  command  line
188              will be affected
189                                      by operations
190                -t THREAD-LIST, --threads THREAD-LIST
191                                      THREAD-LIST affected by commands
192
193       tuna apply
194              usage: tuna-cmd.py apply [-h] profilename
195
196              Apply changes described in profile
197
198              positional arguments:
199                profilename  Apply changes described in this file
200
201              optional arguments:
202                -h, --help   show this help message and exit
203
204
205       tuna show_threads
206              usage: tuna-cmd.py show_threads [-h] [-c CPU-LIST | -N | -S CPU-
207              SOCKET-LIST]
208                                              [-t THREAD-LIST |  -q  IRQ-LIST]
209              [-U] [-K] [-C]
210                                              [-G]
211
212              Show thread list
213
214              optional arguments:
215                -h, --help            show this help message and exit
216                -c CPU-LIST, --cpus CPU-LIST
217                                      CPU-LIST affected by commands
218                -N,  --nohz_full        CPUs  in nohz_full kernel command line
219              will be affected
220                                      by operations
221                -S CPU-SOCKET-LIST, --sockets CPU-SOCKET-LIST
222                                      CPU-SOCKET-LIST affected by commands
223                -t THREAD-LIST, --threads THREAD-LIST
224                                      THREAD-LIST affected by commands
225                -q IRQ-LIST, --irqs IRQ-LIST
226                                      IRQ-LIST affect by commands
227                -U, --no_uthreads     Operations will not affect user threads
228                -K,  --no_kthreads      Operations  will  not  affect   kernel
229              threads
230                -C, --affect_children
231                                      Operation will affect children threads
232                -G,  --cgroups          Display the processes with the type of
233              cgroups they
234                                      are in
235                -z, --spaced          Display spaced view for cgroups
236
237
238       tuna show_irqs
239              usage: tuna-cmd.py show_irqs [-h] [-c CPU-LIST | -N  |  -S  CPU-
240              SOCKET-LIST]
241                                           [-q IRQ-LIST]
242
243              Show IRQ list
244
245              optional arguments:
246                -h, --help            show this help message and exit
247                -c CPU-LIST, --cpus CPU-LIST
248                                      CPU-LIST affected by commands
249                -N,  --nohz_full        CPUs  in nohz_full kernel command line
250              will be affected
251                                      by operations
252                -S CPU-SOCKET-LIST, --sockets CPU-SOCKET-LIST
253                                      CPU-SOCKET-LIST affected by commands
254                -q IRQ-LIST, --irqs IRQ-LIST
255                                      IRQ-LIST affect by commands
256
257
258       tuna show_configs
259              usage: tuna-cmd.py show_configs [-h]
260
261              List preloaded profiles
262
263              optional arguments:
264                -h, --help  show this help message and exit
265
266
267        tuna what_is
268              usage: tuna-cmd.py what_is [-h] THREAD-LIST
269
270              Provides help about selected entities
271
272              positional arguments:
273                THREAD-LIST  THREAD-LIST affected by commands
274
275              optional arguments:
276                -h, --help   show this help message and exit
277
278        tuna gui
279              usage: tuna-cmd.py gui [-h] [-d] [-R MSEC]
280                                     [-c CPU-LIST | -N |  -S  CPU-SOCKET-LIST]
281              [-U] [-K]
282
283              Start the GUI
284
285              optional arguments:
286                -h, --help            show this help message and exit
287                -d,  --disable_perf    Explicitly disable usage of perf in GUI
288              for process
289                                      view
290                -R MSEC, --refresh MSEC
291                                      Refresh the GUI every MSEC milliseconds
292                -c CPU-LIST, --cpus CPU-LIST
293                                      CPU-LIST affected by commands
294                -N, --nohz_full       CPUs in nohz_full  kernel  command  line
295              will be affected
296                                      by operations
297                -S CPU-SOCKET-LIST, --sockets CPU-SOCKET-LIST
298                                      CPU-SOCKET-LIST affected by commands
299                -U, --no_uthreads     Operations will not affect user threads
300                -K,   --no_kthreads      Operations  will  not  affect  kernel
301              threads
302
303       Modifiers
304
305       -c, --cpus=CPU-LIST
306              CPU-LIST affected by commands. Requires a CPU number,  a  range,
307              or a comma-separated list of CPU numbers.
308
309       -S, --sockets=CPU-SOCKET-LIST
310              CPU-SOCKET-LIST  affected  by commands. Requires a socket number
311              or a comma-separated list of socket numbers.
312
313       -t, --threads=THREAD-LIST
314              THREAD-LIST affected by commands. Requires a  thread  number  or
315              thread  name, or a comma-separated list of thread numbers and/or
316              names. Thread names may contain wildcards. Be sure to  quote  or
317              escape any wildcard specifications.
318
319
320       USAGE EXAMPLES
321              If  for instance the Ethernet NICs have multiple queues for both
322              receive and transmit, each with its own IRQ, the  Ethernet  IRQs
323              can be associated with a CPU socket:
324
325       tuna isolate -S 2
326
327       tuna spread -q 'eth*' -S 2
328
329              Move  everything  off the CPUs in socket 2, then spread the IRQs
330              for the Ethernet devices across those same CPUs.
331
332
333
334tuna                             February 2010                         TUNA(8)
Impressum