簡介
本檔案介紹Cisco路由器上的BGP虛擬記憶體(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