Search

4.4. Tuning Tasks with Tuna

download PDF
To change policy and priority information on threads, use the --priority parameter:
# tuna --threads=pid_or_cmd_list --priority=[policy:]rt_priority
  • The pid_or_cmd_list argument is a list of comma-separated PIDs or command-name patterns.
  • Set the policy to RR for round-robin, FIFO for first in, first out, or OTHER for the default policy.
    For an overview of the scheduling policies, see Section 6.3.6, “Tuning Scheduling Policy”.
  • Set the rt_priority in the range 1–99. 1 is the lowest priority, and 99 is the highest priority.
For example:
# tuna --threads=7861 --priority=RR:40
To verify the changes you set, use the --show_threads parameter both before and after the modifying --priority parameter:
# tuna --threads=sshd --show_threads --priority=RR:40 --show_threads

                      thread       ctxt_switches
    pid SCHED_ rtpri affinity voluntary nonvoluntary             cmd 
  1034   OTHER     0  0,1,2,3        12           17            sshd  
                      thread       ctxt_switches
    pid SCHED_ rtpri affinity voluntary nonvoluntary             cmd 
  1034      RR    40  0,1,2,3        12           17            sshd
This allows you to compare the state of the selected threads before and after your changes.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.