Show Table of Contents
4.4. Tuning Tasks with Tuna
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
RRfor round-robin,FIFOfor first in, first out, orOTHERfor 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_threadsthread 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.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.