TUNA(8)
okay bestie, hydrate π§, put your phone on do-not-disturb, because this is TUNA(8) from the System Administration Utilities corner of the manual and she is long. But that's fine, we're built different. Let's go. π
πΈ NAME πΈ
tuna β program for tuning running processes β¨
π SYNOPSIS π
tuna [OPTIONS]
π DESCRIPTION π
So this manual page explains the tuna program, bestie. What it does is it changes the attributes of application and kernel threads. That's the whole vibe.
tuna can operate on IRQs by name or number, and on tasks or threads by process ID or command-line. CPUs and sets of CPUs can be specified by CPU or socket number. And here's the fun part β IRQ names and process command-lines can include wildcards. slay. π¦
tuna can change scheduling policy, scheduler priority and processor affinity for processes and process threads. tuna can also change the processor affinity for interrupts. And it supports cgroup v2 cpusets for CPU and memory node isolation, which gives you fine-grained control over which processes can run on which CPUs. very main character of it. π
π lowkey important: whentunais invoked without any options it starts up in its graphical interface mode. This manual page explains only the command-line options fortuna.
β¨ GLOBAL OPTIONS β¨
-h,--helpβ Print a list of options.tunawill exit after this action, ignoring the remainder of the command-line. πͺ-v,--versionβ Show version. π-L,--logging=LOG-LEVELβ Log application details to file for given LOG-LEVEL. ποΈ-D,--debugβ Print DEBUG level logging details to console. π-w,--warnβ Warn when thread/IRQ patterns match nothing. β οΈ
π COMMANDS π
π tuna cpu_power
usage: tuna-cmd.py cpu_power [-h] (-c CPU-LIST)
Set or query the idle (power) states of all or a selection of cpus in the CPU-LIST. Modifiers -c may be used to pass the CPU-LIST of cpus to perform the command on. π€
optional arguments:
-h,--helpβ show this help message and exit-i,--idle-infoβ Print general idle information for the selected CPUs, including index values for IDLE-STATE.-s,--status IDLE-STATEβ Print whether IDLE-STATE is enabled on the selected CPUs.-d,--disable IDLE-STATEβ Disable IDLE-STATE on the selected CPUs.-e,--enable IDLE-STATEβ Enable IDLE-STATE on the selected CPUs.-c CPU-LIST,--cpus CPU-LISTβ CPU-LIST affected by commands
π§ tuna isolate
usage: tuna-cmd.py isolate [-h] (-c CPU-LIST | -S CPU-SOCKET-LIST | -N)
[--cpuset [NAME]] [--cpuset-housekeeping ...]
Move all allowed threads and IRQs away from CPU-LIST. Requires -c, -S, or -N. bye bestie π
optional arguments:
-h,--helpβ show this help message and exit-c CPU-LIST,--cpus CPU-LISTβ CPU-LIST affected by commands-S CPU-SOCKET-LIST,--sockets CPU-SOCKET-LISTβ CPU-SOCKET-LIST affected by commands-N,--nohz_fullβ CPUs in nohz_full kernel command line will be affected by operations--cpuset [NAME]β Use cpusets for isolation with optional name (default:tuna_isolated,partition=isolated)--cpuset-housekeeping [NAME] CPU-LISTβ Create housekeeping cpuset:[NAME] CPU-LIST(default name:tuna_housekeeping,partition=member)
π«Ά tuna include
usage: tuna-cmd.py include [-h] (-c CPU-LIST | -S CPU-SOCKET-LIST | -N)
Allow all allowed threads and IRQs to run on CPU-LIST. Requires -c, -S, or -N. come back home π‘
optional arguments:
-h,--helpβ show this help message and exit-c CPU-LIST,--cpus CPU-LISTβ CPU-LIST affected by commands-S CPU-SOCKET-LIST,--sockets CPU-SOCKET-LISTβ CPU-SOCKET-LIST affected by commands-N,--nohz_fullβ CPUs in nohz_full kernel command line will be affected by operations
π tuna move
usage: tuna-cmd.py move [-h] (-c CPU-LIST | -S CPU-SOCKET-LIST | -N | --cpuset CPUSET-NAME)
[-t THREAD-LIST] [-q IRQ-LIST] [-U] [-K]
Move selected entities to CPU-LIST or cpuset. Requires -c, -S, -N, or --cpuset and -t or -q. π¦
optional arguments:
-h,--helpβ show this help message and exit-c CPU-LIST,--cpus CPU-LISTβ CPU-LIST affected by commands-S CPU-SOCKET-LIST,--sockets CPU-SOCKET-LISTβ CPU-SOCKET-LIST affected by commands-N,--nohz_fullβ CPUs in nohz_full kernel command line will be affected by operations--cpuset CPUSET-NAMEβ Move threads/IRQs into cpuset (cgroup v2) instead of setting CPU affinity-t THREAD-LIST,--threads THREAD-LISTβ THREAD-LIST affected by commands-q IRQ-LIST,--irqs IRQ-LISTβ IRQ-LIST affect by commands-U,--no_uthreadsβ Operations will not affect user threads-K,--no_kthreadsβ Operations will not affect kernel threads
π¦ tuna spread
usage: tuna-cmd.py spread [-h] (-c CPU-LIST | -S CPU-SOCKET-LIST | -N)
[-t THREAD-LIST] [-q IRQ-LIST] [-U] [-K]
Spread selected entities over CPU-LIST. The specified threads and IRQs are each assigned to one cpu in CPU-LIST. Requires -c, -S, or -N and -t or -q. it's giving β¨even distributionβ¨
optional arguments:
-h,--helpβ show this help message and exit-c CPU-LIST,--cpus CPU-LISTβ CPU-LIST affected by commands-S CPU-SOCKET-LIST,--sockets CPU-SOCKET-LISTβ CPU-SOCKET-LIST affected by commands-N,--nohz_fullβ CPUs in nohz_full kernel command line will be affected by operations-t THREAD-LIST,--threads THREAD-LISTβ THREAD-LIST affected by commands-q IRQ-LIST,--irqs IRQ-LISTβ IRQ-LIST affect by commands-U,--no_uthreadsβ Operations will not affect user threads-K,--no_kthreadsβ Operations will not affect kernel threads
π tuna priority
usage: tuna-cmd.py priority [-h] -t THREAD-LIST [-C] POLICY:RTPRIO
Set thread scheduler tunables: POLICY and RTPRIO. POLICY is one of OTHER, FIFO, RR, or BATCH. Provide POLICY, RTPRIO, or POLICY:RTPRIO separated by ":". If only POLICY is set, the RT priority will default to 1 if the policy is RT, and 0 otherwise. If only RTPRIO is specified, policy will not be changed. no cap. π―
positional arguments:
POLICY:RTPRIOβ Set thread scheduler tunables: POLICY and RTPRIO
optional arguments:
-h,--helpβ show this help message and exit-t THREAD-LIST,--threads THREAD-LISTβ THREAD-LIST affected by commands-C,--affect_childrenβ Operation will affect children threads
π tuna run
usage: tuna-cmd.py run [-h] [-c CPU-LIST | -S CPU-SOCKET-LIST | -N | --cpuset CPUSET-NAME]
[-p PRIORITY] [-b]
COMMAND
Run the COMMAND. The entire command line must be provided inside "quotes". Modifiers -c, -S, --cpuset and -p can be used to set the affinity and scheduler tunables of the given COMMAND. go off π¨
positional arguments:
COMMANDβ fork a new process and run the"COMMAND"
optional arguments:
-h,--helpβ show this help message and exit-c CPU-LIST,--cpus CPU-LISTβ CPU-LIST affected by commands-S CPU-SOCKET-LIST,--sockets CPU-SOCKET-LISTβ CPU-SOCKET-LIST affected by commands-N,--nohz_fullβ CPUs in nohz_full kernel command line will be affected by operations--cpuset CPUSET-NAMEβ Run process in specified cpuset (cgroup v2) instead of setting CPU affinity-p PRIORITY,--priority PRIORITYβ Set thread scheduler tunables: POLICY and RTPRIO-b,--backgroundβ Run command as background task
πΎ tuna save
usage: tuna-cmd.py save [-h] [-c CPU-LIST | -S CPU-SOCKET-LIST | -N]
[-t THREAD-LIST]
FILENAME
Save kthreads sched tunables to FILENAME ποΈ
positional arguments:
FILENAMEβ Save kthreads sched tunables to this file
optional arguments:
-h,--helpβ show this help message and exit-c CPU-LIST,--cpus CPU-LISTβ CPU-LIST affected by commands-S CPU-SOCKET-LIST,--sockets CPU-SOCKET-LISTβ CPU-SOCKET-LIST affected by commands-N,--nohz_fullβ CPUs in nohz_full kernel command line will be affected by operations-t THREAD-LIST,--threads THREAD-LISTβ THREAD-LIST affected by commands
π§΅ tuna show_threads
usage: tuna-cmd.py show_threads [-h] [-c CPU-LIST | -N | -S CPU-SOCKET-LIST]
[-t THREAD-LIST | -q IRQ-LIST] [-U] [-K] [-C]
[-n] [-G] [--cpuset CPUSET-NAME] [-z]
Show thread list π
-h,--helpβ the classic: pops the help message and dips π-c CPU-LIST,--cpus CPU-LISTβ the CPU-LIST that your commands are gonna hit β¨-N,--nohz_fullβ whatever CPUs are sitting in thenohz_fullkernel command line get caught up in the operations too, no cap π-S CPU-SOCKET-LIST,--sockets CPU-SOCKET-LISTβ same energy, but for the CPU-SOCKET-LIST π§¦-t THREAD-LIST,--threads THREAD-LISTβ the THREAD-LIST the commands are gonna affect π§΅-q IRQ-LIST,--irqs IRQ-LISTβ the IRQ-LIST the commands are gonna affect β‘-U,--no_uthreadsβ operations will not touch user threads, they said what they said π ββοΈ-K,--no_kthreadsβ and operations will not touch kernel threads either, boundaries bestie π§-C,--affect_childrenβ the operation spreads to children threads too, it's giving family plan π«Ά-n,--show_socketsβ shows the network sockets that threads are using (heads up: this one needs theinet_diagmodule, so hydrate it first) π-G,--cgroupsβ displays the processes plus which type of cgroups they're living in, showing you the whole apartment building π’--cpuset CPUSET-NAMEβ only shows threads inside the cpuset you named π-z,--spacedβ the spaced-out view for cgroups, aesthetically pleasing, we love a layout π
tuna show_irqs π
tuna-cmd.py show_irqs [-h] [-c CPU-LIST | -N | -S CPU-SOCKET-LIST] [-q IRQ-LIST]
Show IRQ list β literally just shows you the IRQ list, that's the whole vibe π
Optional arguments:
-h,--helpβ shows this help message and exits-c CPU-LIST,--cpus CPU-LISTβ CPU-LIST affected by commands-N,--nohz_fullβ CPUs in thenohz_fullkernel command line will be affected by operations-S CPU-SOCKET-LIST,--sockets CPU-SOCKET-LISTβ CPU-SOCKET-LIST affected by commands-q IRQ-LIST,--irqs IRQ-LISTβ IRQ-LIST affected by commands
tuna show_configs π
tuna-cmd.py show_configs [-h]
List preloaded profiles β shows you the profiles that are already loaded up and ready ποΈ
Optional arguments:
-h,--helpβ shows this help message and exits
tuna what_is π¦
tuna-cmd.py what_is [-h] THREAD-LIST
Provides help about selected entities β like a lil "who even is this" lookup service, but for threads π
Positional arguments:
THREAD-LISTβ THREAD-LIST affected by commands
Optional arguments:
-h,--helpβ shows this help message and exits
tuna gui β¨
tuna-cmd.py gui [-h] [-d] [-R MSEC] [-c CPU-LIST | -N | -S CPU-SOCKET-LIST] [-U] [-K]
Start the GUI β yes bestie, a whole graphical interface, main character energy π₯οΈπ
Optional arguments:
-h,--helpβ shows this help message and exits-d,--disable_perfβ explicitly disables using perf in the GUI for the process view, no perf for you π-R MSEC,--refresh MSECβ refreshes the GUI every MSEC milliseconds, so pick your chaos level β±οΈ-c CPU-LIST,--cpus CPU-LISTβ CPU-LIST affected by commands-N,--nohz_fullβ CPUs in thenohz_fullkernel command line will be affected by operations-S CPU-SOCKET-LIST,--sockets CPU-SOCKET-LISTβ CPU-SOCKET-LIST affected by commands-U,--no_uthreadsβ operations will not affect user threads-K,--no_kthreadsβ operations will not affect kernel threads
tuna cpuset π§
tuna-cmd.py cpuset [-h] {create,list,destroy,move,show,status,modify,save,apply}
Manage CPU sets (cgroup v2). Cpusets give you fine-grained control over which CPUs processes are allowed to run on, and they come with NUMA-aware memory node assignment plus kernel-enforced isolation. It's giving β¨controlβ¨.
Subcommands:
{create,list,destroy,move,show,status,modify,save,apply}
tuna cpuset create π±
tuna-cmd.py cpuset create [-h] -c CPU-LIST [-n NAME] [-i] [-m MEM-NODES]
Create a new cpuset with specified CPUs. Memory nodes get auto-detected from CPU topology unless you go out of your way to set them manually πͺ
Required arguments:
-c CPU-LIST,--cpus CPU-LISTβ CPU-LIST to assign to the cpuset
Optional arguments:
-h,--helpβ shows this help message and exits-n NAME,--name NAMEβ cpuset name (default: auto-generatetunaN) π·οΈ-i,--isolatedβ sets the CPU partition to isolated, which is kernel-enforced exclusivity, very VIP rope situation π§-m MEM-NODES,--memory-nodes MEM-NODESβ memory nodes (default: auto-detect from CPUs, e.g.,"0"or"0-1")
tuna cpuset list π
tuna-cmd.py cpuset list [-h] [-p PATTERN] [-v] [--show-empty] [--no-recursive]
List cpusets. By default, empty cpusets (the ones with no CPUs assigned) get skipped, because we're not doing filler content π«
Optional arguments:
-h,--helpβ shows this help message and exits-p PATTERN,--pattern PATTERNβ filter by glob pattern (e.g.,tuna*) π-v,--verboseβ show detailed info (CPUs, tasks, partition type), spill the tea β--show-emptyβ include cpusets with no CPUs assigned (default: skip empty)--no-recursiveβ only search top-level cpusets, surface level only π«§
tuna cpuset destroy π
tuna-cmd.py cpuset destroy [-h] [-p PATTERN] [-f] [--include-empty] [--no-recursive] [NAME ...]
Destroy cpuset(s) β yep, we're deleting them, rest in peace πͺ¦
Positional arguments:
NAMEβ cpuset name(s) to destroy (one or more, OR use--pattern)
Optional arguments:
-h,--helpβ shows this help message and exits-p PATTERN,--pattern PATTERNβ glob pattern to destroy multiple cpusets (e.g.,tuna*)-f,--forceβ migrate tasks to the root cgroup before destroying, so nobody gets left homeless π--include-emptyβ when using--pattern, include cpusets with no CPUs assigned--no-recursiveβ only destroy top-level cpusets when using--pattern
tuna cpuset move π
tuna-cmd.py cpuset move [-h] [-t THREAD-LIST] [-p PID-LIST] NAME
Move processes to a cpuset β relocation era, new cpuset, who dis π¦
Positional arguments:
NAMEβ cpuset name to move processes to
Optional arguments:
-h,--helpβ shows this help message and exits-t THREAD-LIST,--threads THREAD-LISTβ THREAD-LIST affected by commands (supports patterns)-p PID-LIST,--pids PID-LISTβ comma-separated list of PIDs to move
tuna cpuset show π
tuna-cmd.py cpuset show [-h] [--show-tasks] NAME
Show detailed information about a cpuset β the deep dive, the full lore π
Positional arguments:
NAMEβ cpuset name to show
Optional arguments:
-h,--helpβ shows this help message and exits--show-tasksβ show a detailed list of tasks/processes π§΅
tuna cpuset status π
tuna-cmd.py cpuset status [-h] [-p PATTERN] [--show-empty] [--no-recursive]
Show system-wide cpuset overview with statistics β the big picture, numbers included, we love data π
Optional arguments:
-h,--helpβ shows this help message and exits-p PATTERN,--pattern PATTERNβ filter by glob pattern (e.g.,tuna*)--show-emptyβ include cpusets with no CPUs assigned (default: skip empty)--no-recursiveβ only show top-level cpusets
tuna cpuset modify π§
tuna-cmd.py cpuset modify [-h] [--add-cpus CPU-LIST] [--remove-cpus CPU-LIST] [-m MEM-NODES] [--isolated | --no-isolated] NAME
Modify an existing cpuset without destroying it β glow-up, not demolition π
Positional arguments:
NAMEβ cpuset name to modify
Optional arguments:
-h,--helpβ shows this help message and exits--add-cpus CPU-LISTβ CPUs to add to the cpuset (e.g.,4-7or4,5,6,7)--remove-cpus CPU-LISTβ CPUs to remove from the cpuset (e.g.,0-1or0,1)-m MEM-NODES,--memory-nodes MEM-NODESβ set memory nodes (e.g.,"0"or"0-1")--isolatedβ set the CPU partition to isolated--no-isolatedβ set the CPU partition to member (not isolated)
tuna cpuset save πΎ
tuna-cmd.py cpuset save [-h] [filename]
Save cpuset configuration to YAML profile β snapshot it, keep it forever, scrapbook behaviour πΈ
Positional arguments:
filenameβ output YAML file. The default path depends on execution context:./cpuset-profile.yamlwhen running from development (tuna-cmd.py)/etc/tuna/cpuset-profile.yamlwhen running from production (tuna)
Optional arguments:
-h,--helpβ shows this help message and exits
tuna cpuset apply πͺ
tuna-cmd.py cpuset apply [-h] [-v] [filename]
Apply cpuset configuration from YAML profile β load it back in and let it cook π³
Positional arguments:
filenameβ input YAML file. The default path depends on execution context:./cpuset-profile.yamlwhen running from development (tuna-cmd.py)/etc/tuna/cpuset-profile.yamlwhen running from production (tuna)
Optional arguments:
-h,--helpβ shows this help message and exits-v,--verboseβ print detailed progress messages, narrate the whole journey π£οΈ
β¨ MODIFIERS β¨
-c, --cpus=CPU-LIST
The CPU-LIST that gets affected by commands. It wants a CPU number, a range, or a comma-separated list of CPU numbers. So like, a single CPU, a lil range, or the whole lineup β your choice bestie π«
-S, --sockets=CPU-SOCKET-LIST
The CPU-SOCKET-LIST that gets affected by commands. It wants a socket number or a comma-separated list of socket numbers π§¦
-t, --threads=THREAD-LIST
The THREAD-LIST that gets affected by commands. It wants a thread number or a thread name, or a comma-separated list of thread numbers and/or names. Thread names may contain wildcards β and this is important, bestie β be sure to quote or escape any wildcard specifications, because your shell will absolutely snatch them up and eat them otherwise π
Wildcards are giving "I'll do it myself" if you don't quote or escape them. Quote them. Escape them. Protect them. π«Ά
-q,--irqs=IRQ-LISTβ this is the IRQ list that your commands are gonna mess with π it wants an IRQ number, or an IRQ user name, or a whole comma-separated list mixing numbers and/or user names. IRQ user names can contain wildcards, bestie β so be sure to quote or escape any wildcard specs or your shell is gonna snatch them up before tuna ever sees them π
π USAGE EXAMPLES π
okay this is the part where it all clicks, fr fr. let's go β¨
π CPU Affinity Examples π
so like, say your Ethernet NICs have multiple queues for both receive and transmit, and each one has its own IRQ. then you can associate the Ethernet IRQs with a CPU socket, like this:
tuna isolate -S 2
tuna spread -q 'eth*' -S 2
Move everything off the CPUs in socket 2, then spread the IRQs for the Ethernet devices across those same CPUs. iconic behavior tbh π
π¦ Cpuset Examples π¦
create an isolated cpuset for real-time workloads:
tuna cpuset create -c 2-5 -n rt_workload -i
Create a cpuset named 'rt_workload' with CPUs 2-5, set to isolated partition. Memory nodes are auto-detected from CPU topology. no manual node-picking required, we love a self-sufficient queen π
launch a real-time application in the rt_workload cpuset with FIFO scheduler and priority 80:
tuna run --cpuset rt_workload -p FIFO:80 'my_rt_app'
isolate CPUs using cpusets β and yes bestie, this is more powerful than traditional affinity:
tuna isolate -c 4-7 --cpuset my_isolated --cpuset-housekeeping my_hk 0-3
Isolate CPUs 4-7 by creating 'my_isolated' cpuset with kernel-enforced exclusivity (partition=isolated), and move all existing processes to 'my_hk' cpuset on CPUs 0-3 (partition=member). kernel-enforced?? she's literally doing the most and I'm obsessed π
move all kworker threads to the rt_workload cpuset:
tuna move --cpuset rt_workload -t 'kworker/*'
show only the processes running in the rt_workload cpuset:
tuna show_threads --cpuset rt_workload
add CPUs 6-7 to the rt_workload cpuset without disrupting running processes:
tuna cpuset modify rt_workload --add-cpus 6-7
display a system-wide overview of all cpusets with statistics:
tuna cpuset status
save the current cpuset configuration to a YAML profile:
tuna cpuset save /etc/tuna/my-rt-config.yaml
heads up bestie, the default path is different depending on how you're running it π when you're running the installed version (tuna), the default path is/etc/tuna/cpuset-profile.yaml. when you're running from development (tuna-cmd.py), it defaults to./cpuset-profile.yamlin the current directory. iykyk β¨
apply a previously saved cpuset configuration from a YAML profile:
tuna cpuset apply /etc/tuna/my-rt-config.yaml
Apply a previously saved cpuset configuration from a YAML profile. This recreates all cpusets defined in the profile with their CPU assignments, memory nodes, and partition settings. it just... puts it all back?? the way that this is basically a save point in a video game π
and that's the whole page, bestie!! π«Ά this is tuna, from the tuna source, dated July 2026 πΈ go forth and pin your IRQs, isolate your CPUs, and live your main character real-time-scheduling fantasy πβ¨ bye ily ππ
π¦ where this page comes from
- fedora 43: tuna 0.21-1.fc43 Β· GPL-2.0-only AND LGPL-2.1-only
- fedora 44: tuna 0.21-1.fc44 Β· GPL-2.0-only AND LGPL-2.1-only
- π the page's license: GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms