Rechercher

Ce contenu n'est pas disponible dans la langue sélectionnée.

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

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.