Step 2: Check Routing Protocol Process (rpd) Memory Usage
Purpose
When you notice a lot of memory usage, you can obtain detailed information about the memory utilization of routing tasks to get an idea of what is going on. The routing process (rpd) is the main task that uses Routing Engine memory.
Action
To check routing process memory usage, enter the following JUNOS CLI operational mode commands:
user@host>show route summaryuser@host>show task memory detailSample Output
user@host>show route summaryAutonomous system number: 209Router ID: 205.175.0.170inet.0: 179783 destinations, 898393 routes (179771 active, 146 holddown, 157 hidden)Direct: 17 routes, 17 activeLocal: 18 routes, 18 activeBGP: 896632 routes, 178010 activeStatic: 32 routes, 31 activeIS-IS: 1694 routes, 1694 activeinet.2: 8766 destinations, 22700 routes (8766 active, 124 holddown, 73 hidden)Direct: 17 routes, 17 activeLocal: 18 routes, 18 activeBGP: 20939 routes, 7006 activeStatic: 32 routes, 31 activeIS-IS: 1694 routes, 1694 activeinet.3: 1614 destinations, 1719 routes (1614 active, 0 holddown, 0 hidden)IS-IS: 1613 routes, 1551 activeRSVP: 45 routes, 45 activeLDP: 61 routes, 18 activeiso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)Direct: 1 routes, 1 activempls.0: 371 destinations, 371 routes (371 active, 0 holddown, 0 hidden)MPLS: 3 routes, 3 activeRSVP: 303 routes, 303 activeLDP: 65 routes, 65 activeuser@R1>show task memory detail------------------------- Overall Memory Report -------------------------Size TP Allocs Mallocs AllocBytes MaxAllocs MaxBytes FreeBytes12 8140 186959 2341188 200824 2409888 5497216 4061 182 67888 4586 73376 584016 T - - - 393571 6297136 -20 688588 51 13772780 713704 14274080 423956[...Output truncated...]8192 P 91 - 745472 195 1597440 -12288 P - - - 1 12288 -block 5 - 137200 14 137732 6160pool 50 - 896 100 1792 3200alloc - 8 383744 10 397365 9472-------------------------------------------------------------------------389169664 578341705 72977920------------------------ Allocator Memory Report ------------------------Name Size Alloc DTP Alloc Alloc MaxAlloc MaxAllocSize Blocks Bytes Blocks Bytespatricia_root_struct 8 12 7741 92892 8130 97560sockaddr_un.i802 8 12 2 24 2 24sockaddr_un.tag 8 12 371 4452 995 11940if_addr_entry 8 12 - - 1 12gw_entry_list 8 12 1 12 1 12isis_proto_list 8 12 25 300 30 360struct krt_scb 12 16 4 64 6 96ldp_rt_data 12 16 61 976 133 2128config_list 12 16 2353 37648 2353 37648TED NodeInfo 12 16 845 13520 907 14512isis_area_addr 12 16 544 8704 612 9792isis_nh_list 12 16 237 3792 922 14752isis_tsi 12 16 17 272 19 304bgp_use_block 12 16 - - 112 1792isis_route_walk_cont 12 16 T - - 1 16bgpg_rtinfo_entry 12 16 T - - 393571 6297136task_floating_socket 16 20 1 20 1 20[...Output truncated...]rt_parse_memory 4092 4096 TP - - 1 4096noblock_buffer_blk 4092 4096 TP 5 20480 811 3321856bgp_buffer 4100 8192 P 91 745472 100 819200bgp_outbuf 4104 8192 P - - 94 770048ldp_buffer 4108 8192 P - - 7 57344RPD SNMP 8268 12288 P - - 1 12288LDP config various 1 896 1 896-------------------------------------------------------------------------349037508 543172620-------------------------- Malloc Usage Report --------------------------Name Allocs Bytes MaxAllocs MaxBytes FuncCallsMGMT.local 1 12 1 12 1RSVP - - 1 2048 156084BGP_Group_Tweak-RTClien 2 24 2 24 2[...Output truncated...]LDP 2 24 2 24 2KRT Request - - 1 16 446888BGP_Group_Packet-Design 2 24 2 24 38[...Output truncated...]MPLS 22272 1221656 22274 1221784 228522BGP.0.0.0.0+179 186419 2237028 192292 2307504 282141191IS-IS I/O./var/run/ppmd 1 66536 43 103916 695536231IS-IS 2407 361372 5887 446076 889294754BGP RT Background 3 66556 3 66556 3SNMP Subagent./var/run/ - 24 1 9144 3677022KRT 2 205616 3 207900 10ASPaths 13901 1581544 18023 2067605 293868769RT 27 556 28 580 2815Scheduler 194 2604 199 2684 41382--Anonymous-- 4294944918 4293764616 4294967294 4294967292 45560848--System-- 38565 35474324 38684 35487048 235115763-------------------------------------------------------------------------40015436 41923181Dynamically allocated memory: 485789696 Maximum: 541736960Program data+BSS memory: 2101248 Maximum: 2101248Page data overhead: 3039232 Maximum: 3039232Page directory size: 512000 Maximum: 512000----------Total bytes in use: 491442176(70% of available memory)What It Means
The sample output shows summary statistics about the entries in the routing table (
show route summarycommand) and the memory usage breakdown (show task memory detailcommand) for the routing process (rpd). The two commands provide a comprehensive picture of the memory utilization of the routing protocol process.The
show route summarycommand shows the number of routes in the various routing tables. In the sample output, the routing tables represented areinet.0,inet.2,inet.3,iso.0, andmpls.0. Within each routing table, all of the active, hold-down, and hidden destinations and routes are summarized for all the protocols from which routes are learned. Routes are in thehold-downstate prior to being declared inactive, andhiddenroutes are not used because of routing policy. Routes in thehold-downandhiddenstates are still using memory because they appear in the routing table.In addition, routes are summarized in the following categories: those directly connected to the network (
Direct), local routes (Local), and routes learned from configured routing protocols, such as BGP and IS-IS.The
show task memory detailcommand lists the data structures within the tasks run by the routing protocol process (rpd). Tasks are enabled depending on the router's configuration. For example,isis_area_addris a data structure resulting from the IS-IS configuration. TheAllocBytesfield indicates the highest amount of memory used by the data structure. For example, theisis_area_addrdata structure has 544 blocks of allocated memory, each block is allocated a value of 16 bytes, resulting in allocated bytes of 8704. The maximum allocated blocks and bytes are high-water marks for a data structure. For more information on displaying task-related information, see Display Tasks.The
Total bytes in usefield shows the total amount of memory used by the routing protocol process (rpd).