Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tuna(8) [centos man page]

TUNA(8) 						  System Administration Utilities						   TUNA(8)

NAME
tuna - program for tuning running processes SYNOPSIS
tuna [OPTIONS] DESCRIPTION
This manual page explains the tuna program. The program can be used to change the attributes of application and kernel threads. The tuna 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. tuna can change scheduling policy, scheduler priority and processor affinity for processes and process threads. tuna can also change the processor affinity for interrupts. When tuna is invoked without any options it starts up in its graphical interface mode. This manual page explains only the command-line options for tuna OPTIONS
tuna has both action options and modifier 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. Actions -h, --help Print a list of options. tuna will exit after this action, ignoring the remainder of the command-line. -g, --gui Start the GUI. Actions that follow this on the command-line will be processed without waiting for the GUI to complete. -a, --config_file_apply=profilename Apply changes described in profile -l, --config_file_list List preloaded profiles -i, --isolate Move all threads away from CPU-LIST. Requires -c or -S. -I, --include Allow all threads to run on CPU-LIST. Requires -c or -S. -m, --move Move selected entities to CPU-LIST. Requires -c and either -t or -q. -p, --priority=[POLICY:]RTPRIO Set thread scheduler tunables: POLICY and RTPRIO. POLICY is one of OTHER, FIFO, RR, or BATCH. Requires -t. -P, --show_threads Show thread list. -s, --save=FILENAME Save kthreads sched tunables to FILENAME. -v, --version Show version -W, --what_is Provides help about selected entities. Requires -t. -x, --spread Spread selected entities over CPU-LIST. Requires at least one of -t or -q. The specified threads and IRQs are each assigned to one cpu in CPU-LIST. Modifiers -c, --cpus=CPU-LIST CPU-LIST affected by commands. Requires a CPU number or a comma-separated list of CPU numbers. -C, --affect_children Operation will affect children threads. -f, --filter Disable display of selected CPUs in --gui. Requires -c -G, --cgroup Display the processes with the type of cgroups they are in. Requires -P -K, --no_kthreads Operations will not affect kernel threads. -q, --irqs=IRQ-LIST IRQ-LIST affected by commands. Requires an IRQ number or a comma-separated list of IRQ numbers. -S, --sockets=CPU-SOCKET-LIST CPU-SOCKET-LIST affected by commands. Requires a socket number or a comma-separated list of socket numbers. -t, --threads=THREAD-LIST 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. -U, --no_uthreads Operations will not affect user threads. USAGE EXAMPLES
If for instance the Ethernet NICs have multiple queues for both receive and transmit, each with its own IRQ, the Ethernet IRQs can be asso- ciated with a CPU socket: 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. tuna February 2010 TUNA(8)

Check Out this Related Man Page

TASKSET(1)							   User Commands							TASKSET(1)

NAME
taskset - set or retrieve a process's CPU affinity SYNOPSIS
taskset [options] mask command [argument...] taskset [options] -p [mask] pid DESCRIPTION
taskset is used to set or retrieve the CPU affinity of a running process given its pid, or to launch a new command with a given CPU affin- ity. CPU affinity is a scheduler property that "bonds" a process to a given set of CPUs on the system. The Linux scheduler will honor the given CPU affinity and the process will not run on any other CPUs. Note that the Linux scheduler also supports natural CPU affinity: the scheduler attempts to keep processes on the same CPU as long as practical for performance reasons. Therefore, forcing a specific CPU affinity is useful only in certain applications. The CPU affinity is represented as a bitmask, with the lowest order bit corresponding to the first logical CPU and the highest order bit corresponding to the last logical CPU. Not all CPUs may exist on a given system but a mask may specify more CPUs than are present. A retrieved mask will reflect only the bits that correspond to CPUs physically on the system. If an invalid mask is given (i.e., one that corresponds to no valid CPUs on the current system) an error is returned. The masks may be specified in hexadecimal (with or without a leading "0x"), or as a CPU list with the --cpu-list option. For example, 0x00000001 is processor #0, 0x00000003 is processors #0 and #1, 0xFFFFFFFF is processors #0 through #31, 32 is processors #1, #4, and #5, --cpu-list 0-2,6 is processors #0, #1, #2, and #6. When taskset returns, it is guaranteed that the given program has been scheduled to a legal CPU. OPTIONS
-a, --all-tasks Set or retrieve the CPU affinity of all the tasks (threads) for a given PID. -c, --cpu-list Interpret mask as numerical list of processors instead of a bitmask. Numbers are separated by commas and may include ranges. For example: 0,5,8-11. -p, --pid Operate on an existing PID and do not launch a new task. -V, --version Display version information and exit. -h, --help Display help text and exit. USAGE
The default behavior is to run a new command with a given affinity mask: taskset mask command [arguments] You can also retrieve the CPU affinity of an existing task: taskset -p pid Or set it: taskset -p mask pid PERMISSIONS
A user can change the CPU affinity of a process belonging to the same user. A user must possess CAP_SYS_NICE to change the CPU affinity of a process belonging to another user. A user can retrieve the affinity mask of any process. SEE ALSO
chrt(1), nice(1), renice(1), sched_getaffinity(2), sched_setaffinity(2) See sched(7) for a description of the Linux scheduling scheme. AUTHOR
Written by Robert M. Love. COPYRIGHT
Copyright (C) 2004 Robert M. Love. This is free software; see the source for copying conditions. There is NO warranty; not even for MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. AVAILABILITY
The taskset command is part of the util-linux package and is available from https://www.kernel.org/pub/linux/utils/util-linux/. util-linux August 2014 TASKSET(1)
Man Page