From Fedora Project Wiki

Revision as of 17:33, 23 February 2023 by Jkacur (talk | contribs)

The user interface changed slightly upstream, but is far easier now.

[jkacur@fionn tuna]$ tuna --help

usage: tuna [-h] [-v] [-L LOG-LEVEL] [-D]

                  {isolate,include,move,spread,priority,run,save,apply,show_threads,show_irqs,show_configs,what_is,gui}
                  ...

tuna - Application Tuning Program

commands:

 {isolate,include,move,spread,priority,run,save,apply,show_threads,show_irqs,show_configs,what_is,gui}
   isolate             Move all allowed threads and IRQs away from CPU-LIST
   include             Allow all threads to run on CPU-LIST
   move                Move selected entities to CPU-LIST
   spread              Spread selected entities over CPU-LIST
   priority            Set thread scheduler tunables: POLICY and RTPRIO
   run                 Fork a new process and run the COMMAND
   save                Save kthreads sched tunables to FILENAME
   apply               Apply changes described in profile
   show_threads        Show thread list
   show_irqs           Show IRQ list
   show_configs        List preloaded profiles
   what_is             Provides help about selected entities
   gui                 Start the GUI

options:

 -h, --help            show this help message and exit
 -v, --version         show version
 -L LOG-LEVEL, --logging LOG-LEVEL
                       Log application details to file for given LOG-LEVEL
 -D, --debug           Print DEBUG level logging details to console

[jkacur@fionn tuna]$ tuna priority -h usage: tuna priority [-h] -t THREAD-LIST [-C] POLICY:RTPRIO

Set thread scheduler tunables: POLICY and RTPRIO

positional arguments:

 POLICY:RTPRIO         Set thread scheduler tunables: POLICY and RTPRIO

options:

 -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 thread

[jkacur@fionn tuna]$ pgrep "xfce4-session"

2334

[jkacur@fionn tuna]$ chrt -p $(pgrep "xfce4-session")

pid 2334's current scheduling policy: SCHED_OTHER

pid 2334's current scheduling priority: 0

[jkacur@fionn tuna]$ tuna priority -t 2334 SCHED_FIFO:1

[jkacur@fionn tuna]$ chrt -p $(pgrep "xfce4-session")

pid 2334's current scheduling policy: SCHED_FIFO

pid 2334's current scheduling priority: 1