top - NI-20

Discussion in 'Installation/Configuration' started by pecka33, Dec 14, 2022.

  1. pecka33

    pecka33 Member

    Hello,

    when i use command top i can see list of proccess. I can see

    Code:
     219406 web3      20   0  196172  28976  18400 S   1.3   0.1   0:00.05 php-fpm+
         12 root      20   0       0      0      0 I   0.3   0.0   1:14.91 rcu_sch+
        233 root      20   0       0      0      0 S   0.3   0.0   0:05.19 jbd2/sd+
        526 memcache  20   0  433972  31068   2312 S   0.3   0.1   2:26.02 memcach+
        567 root      20   0 1433288  32220   9952 S   0.3   0.1   5:28.27 fail2ba+
        693 mysql     20   0 3688080   1.2g  23048 S   0.3   3.9  19:11.73 mariadbd
     208239 www-data  20   0 3545016  43588  11320 S   0.3   0.1   0:42.97 /usr/sb+
     219300 root      20   0   12680   3700   3088 R   0.3   0.0   0:00.11 top
          1 root      20   0  164268  10548   7708 S   0.0   0.0   0:22.57 systemd
          2 root      20   0       0      0      0 S   0.0   0.0   0:00.04 kthreadd
          3 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 rcu_gp
          4 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 rcu_par+
          6 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kworker+
          8 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 mm_perc+
          9 root      20   0       0      0      0 S   0.0   0.0   0:00.00 rcu_tas+
         10 root      20   0       0      0      0 S   0.0   0.0   0:00.00 rcu_tas+
         11 root      20   0       0      0      0 S   0.0   0.0   0:00.68 ksoftir+
    
    Is here anybody who can tell me why for example in 3 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_gp is "-20". What does it mean?
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You omitted column headers from the listing you posted. That would help deciphering the output.
    In line
    Code:
    3 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 rcu_gp
    the 4th column with value -20 has header NI, which means "nice value", I learned this from reading the top man page.
     
    till likes this.
  3. pyte

    pyte Well-Known Member HowtoForge Supporter

    Nice values are user-space values that we can use to control the priority of a process. The nice value range is -20 to +19 where -20 is highest, 0 default and +19 is lowest.

    So -20 means these are very high priority processes. However keep in mind the nice value is a user-space value. The kernel itself has a value called "priority value" to control this.

    In your example the process RCU is a kernel synchronization mechanism, and as a result should have the highest priority.
     

Share This Page