Support Support Downloads Knowledge Base Juniper Support Portal Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[Junos] High CPU utilization after running 'show route | no-more' command

0

0

Article ID: KB31807 KB Last Updated: 11 Aug 2020Version: 2.0
Summary:

This article describes the high CPU behavior that is expected when any route-related commands are executed with a large number of routes installed in the routing table.

 

Symptoms:

Routing Engine (RE) CPU spikes are observed with a large number of routes in the routing table when any route-related commands with the "| no-more" option are executed, which can cause a delay in the Command Line Interface (CLI). From the system processes extensive output, the following processes may show high CPU utilization depending on how one is accessing the device.

mgd, clid, telnetd, sshd
 
lab@R1> show system processes extensive
last pid: 14359;  load averages:  0.43,  0.63,  0.55  up 10+04:18:39    13:03:16
154 processes: 4 running, 136 sleeping, 14 waiting
 
Mem: 707M Active, 307M Inact, 140M Wired, 650M Cache, 201M Buf, 29G Free
Swap: 8192M Total, 8192M Free
 
  PID USERNAME  THR PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND
   10 root        1 171   52     0K    16K RUN    165.0H 41.99% idle
13856 labroot     1 103    0 26488K 20840K RUN      0:05 16.31% cli       
   19 root        1 -68 -187     0K    16K RUN     22.1H 11.82% irq11: em0 em1 em2*
13857 root        1   4    0 40792K 32760K sbwait   0:03  8.45% mgd
13851 root        1  99    0  2028K  1532K select   0:03  7.91% telnetd
 1790 root        1   4    0   433M   348M kqread  40.5H  3.08% rpd
 
lab@R1> show system processes extensive   
last pid: 14371;  load averages:  1.33,  0.89,  0.66  up 10+04:20:19    13:04:56
154 processes: 4 running, 136 sleeping, 14 waiting
 
Mem: 707M Active, 307M Inact, 140M Wired, 650M Cache, 201M Buf, 29G Free
Swap: 8192M Total, 8192M Free
 
  PID USERNAME  THR PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND
13856 labroot     1 111    0 26488K 20840K RUN      0:39 31.69% cli 
13851 root        1 106    0  2028K  1532K select   0:23 18.60% telnetd 
13857 root        1   4    0 40792K 32728K sbwait   0:22 18.55% mgd  
   19 root        1 -68 -187     0K    16K RUN     22.1H 11.67% irq11: em0 em1 em2*
 1790 root        1   4    0   433M   348M kqread  40.5H  6.25% rpd 

It is also observed that the CPU idle usage is zero percent.

lab@R1> show chassis routing-engine | no-more
Routing Engine status:
  Slot 0:
    Current state                  Master
    Election priority              Master (default)
    Temperature                 47 degrees C / 116 degrees F
    CPU temperature             44 degrees C / 111 degrees F
    DRAM                      32733 MB (32768 MB installed)
    Memory utilization           7 percent
    CPU utilization:
      User                      42 percent
      Background                 0 percent
      Kernel                    35 percent
      Interrupt                 23 percent
      Idle                       0 percent  
    Model                          RE-S-1800x4
    Serial ID                      9013126320
    Start time                     2017-05-20 08:45:06 IST
    Uptime                         10 days, 4 hours, 20 minutes, 17 seconds
    Last reboot reason             Router rebooted after a normal shutdown.
    Load averages:                 1 minute   5 minute  15 minute
                                       1.60       1.01       0.71
 
lab@R1> show chassis routing-engine | no-more   
Routing Engine status:
  Slot 0:
    Current state                  Master
    Election priority              Master (default)
    Temperature                 47 degrees C / 116 degrees F
    CPU temperature             44 degrees C / 111 degrees F
    DRAM                      32733 MB (32768 MB installed)
    Memory utilization           7 percent
    CPU utilization:
      User                      43 percent
      Background                 0 percent
      Kernel                    39 percent
      Interrupt                 18 percent
      Idle                       0 percent
    Model                          RE-S-1800x4
    Serial ID                      9013126320
    Start time                     2017-05-20 08:45:06 IST
    Uptime                         10 days, 4 hours, 20 minutes, 22 seconds
    Last reboot reason             Router rebooted after a normal shutdown.
    Load averages:                 1 minute   5 minute  15 minute
                                       1.63       1.03       0.72
 
Cause:

The router in this example has about 500,000 active routes in the routing table as below:

lab@R1> show route summary
Autonomous system number: 100
Router ID: 100.100.100.100
 
inet.0: 500019 destinations, 500019 routes (500019 active, 0 holddown, 0 hidden)
              Direct:      6 routes,      6 active
               Local:      6 routes,      6 active
                OSPF:      1 routes,      1 active
                 BGP: 500000 routes, 500000 active  
              Static:      3 routes,      3 active
                IGMP:      1 routes,      1 active
                 PIM:      2 routes,      2 active
 
inet.1: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
           Multicast:      3 routes,      3 active
 
inet6.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
                 PIM:      2 routes,      2 active
 
inet6.1: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
           Multicast:      1 routes,      1 active 

The presence of 500,000 active routes in the routing table will cause MGD to fetch data from RPD and display the routes in CLI, causing the respective CPUs to spike for the time period the route output is displayed.

Once the routes are displayed and the command stops, CPUs return to normal as seen below:

lab@R1> show chassis routing-engine
Routing Engine status:
  Slot 0:
    Current state                  Master
    Election priority              Master (default)
    Temperature                 46 degrees C / 114 degrees F
    CPU temperature             44 degrees C / 111 degrees F
    DRAM                      32733 MB (32768 MB installed)
    Memory utilization           7 percent
    CPU utilization:
      User                       0 percent
      Background                 0 percent
      Kernel                     2 percent
      Interrupt                 15 percent
      Idle                      83 percent    
    Model                          RE-S-1800x4
    Serial ID                      9013126320
    Start time                     2017-05-20 08:45:06 IST
    Uptime                         10 days, 4 hours, 25 minutes, 43 seconds
    Last reboot reason             Router rebooted after a normal shutdown.
    Load averages:                 1 minute   5 minute  15 minute
                                       0.05       0.61       0.65
                                                  
lab@R1> show system processes extensive
last pid: 14416;  load averages:  0.04,  0.58,  0.64  up 10+04:26:31    13:11:08
154 processes: 3 running, 137 sleeping, 14 waiting
 
Mem: 707M Active, 307M Inact, 140M Wired, 650M Cache, 201M Buf, 29G Free
Swap: 8192M Total, 8192M Free 
 
  PID USERNAME  THR PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND
   10 root        1 171   52     0K    16K RUN    165.1H 81.10% idle
   19 root        1 -68 -187     0K    16K RUN     22.1H 10.55% irq11: em0 em1 em2*
   11 root        1 -40 -159     0K    16K WAIT   571:40  2.69% swi2: netisr 0
 1680 root        2   8  -88   120M 16856K nanslp 296:01  0.93% chassisd
 1790 root        1   4    0   433M   348M kqread  40.5H  0.00% rpd
   14 root        1 -16    0     0K    16K -       53:35  0.00% yarrow

 

Solution:

This behavior is expected when a large number of routes exist in the routing table and the no-more option is used to display the routes. The CPU is expected to go high when any route-related outputs as follows are executed with the no-more option:

show route
show route extensive/detail
show route active-paths

The recommendation is to avoid usage of the no-more option wherever applicable to ensure that the CPU is stable. However, there is no user impact due to the CPU utilization.

 

Modification History:

2020-08-11: Article reviewed for accuracy; no changes required; article valid and relevant

 

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search