简介
本文档介绍思科路由器上的BGP虚拟内存(RLIMIT)问题,并概述遇到此问题时应采取的步骤。
背景信息
Rlimit定义了XR格式进程的资源限制,因每个进程内存要求而异。这些限制可能因版本而异,因为可以根据新的需求和发现调整这些限制。限制由共享内存、内核和dllmgr等组件的固定内存分配决定,因此不能通过CLI进行配置。
问题摘要
建立BGP对等连接后,内存使用率飙升至90%。这也可能导致BGP进程崩溃。
RP/0/RSP0/CPU0:Jul 15 01:04:24.815 GMT: bgp[1087]: %HA-HA_WD_LIB-4-RLIMIT :wd_handle_sigxfsz: Reached 90% of RLIMIT_DATA
RP/0/RSP0/CPU0:Jul 15 01:04:24.815 GMT: bgp[1087]: %ROUTING-BGP-4-VIRTUAL_MEMORY_LIMIT_THRESHOLD_REACHED : BGP virtual memory has reached 90% of the maximum allowed limit of 2281 MB for this platform
此命令显示任何进程可以访问的最大内存量。
RP/0/RSP0/CPU0:ASR#show bgp process performance-statistics | i RLIMIT
Platform RLIMIT max: 2281701376 bytes
此命令显示堆中的动态限制:
RP/0/RSP0/CPU0:ASR#show bgp instance all scale
BGP instance 0: 'default'
=========================
VRF: default
Neighbors Configured: 2      Established: 2
Address-Family   Prefixes Paths    PathElem   Prefix     Path       PathElem
                                               Memory     Memory     Memory
  IPv4 Unicast    112649   225065   112649     9.88MB     13.74MB    6.77MB
  IPv6 Unicast    6358     12581    6358       645.73KB   786.31KB   391.17KB
------------------------------------------------------------------------------
  Total           119007   237646   119007     10.51MB    14.50MB    7.15MB
node:      node0_RSP0_CPU0
------------------------------------------------------------------
JID    Text       Data       Stack      Dynamic    Dyn-Limit  Shm-Tot    Phy-Tot    Process
------ ---------- ---------- ---------- ---------- ---------- ---------- ---------- -------
1067           1M        10M       572K      2001M      2175M       145M      2012M  bgp          <<<<<<<<<<<<<<
343            8K        12K       128K       421M      1024M        30M       422M  mibd_infra
1141          22M         5M      1012K       374M      2048M        95M       380M  netconf
Total text: 22893 pages
      data: 24102 pages
     stack: 6765 pages
  malloced: 21257 pages
限制
RLIMIT限制是cXR 32位系统的关键因素,在此系统中强制实施内存上限。此限制直接影响可用于BGP进程的内存。
但是,在eXR 64位系统上,RLIMIT显着增加。此增强功能可倍增BGP进程的可用内存,为处理更大的路由表和更多对等体提供更稳健的环境。
请参阅内存分配比较:
带RSP880-LT-TR和eXR的设备的BGP限制为7.4GB
RP/0/RSP0/CPU0:ASR#show processes memory detail 10523
JID         Text       Data       Stack      Dynamic    Dyn-Limit  Shm-Tot    Phy-Tot  Process
==========================================================================================
1087        2M       1030M       136K        41M      7447M       131M       183M     bgp
具有RSP880-LT-TR和cXR的设备的BGP限制为2.5GB
RP/0/RSP0/CPU0:ASR#show processes memory detail 1087
JID    Text       Data       Stack      Dynamic    Dyn-Limit  Shm-Tot    Phy-Tot    Process
------ ---------- ---------- ---------- ---------- ---------- ---------- ---------- -------
1087     1M        10M       356K        31M      2574M        35M        41M        bgp
可能的解决方法/解决方案
要解决BGP的内存问题,可以考虑这些步骤。
这些步骤可以更好地管理内存使用率,并确保BGP进程的稳定性和性能。
如果问题仍未恢复,请收集日志并联系思科TAC:
show tech-support
show tech-support routing bgp
show processes memory detail  location 0/rsp0/cpu0
show processes memory detail  location 0/rsp1/cpu0
show memory summary location all
show memory heap   location 0/rsp0/cpu0
show memory heap   location 0/rsp1/cpu0
show memory heap dllname 
show bgp scale
show bgp scale standby
show bgp all all process performance-statistics
show bgp all all process performance-statistics detail