Behaviour Changed of Dynamic Slow peer.
Slow peer detection and processing is not intended for peers that are permanently slow. Peers that are permanently slow should be moved into their own update group by configuring same route-policy for all the permanent slow peers.
Restrictions
Slow peer detection and processing is not intended for peers that are permanently slow. Peers that are permanently slow should be moved into their own update group by configuring same route-policy for all the permanent slow peers.
Before 7.9.x Slow Peer Detection and Recovery logic:
Slow Peer Logic is evaluated every 60 seconds.
Detect Slow Peer Logic: It is enabled by default
- As long as we have messages queued
AND
- Current time - last message enqueued/processed time > 300 seconds
Recover from Slow Peer Logic:
- As long as we have No messages queued
OR
- Current time - last message enqueued/processed time < 20 seconds
After 7.9.x Slow Peer Detection and Recovery logic:
Redesigned Feature was integrated from IOS-XR 7.9.1 release
This was redesigned due to below problem
- Detection logic was not stringent
- Move dynamic slow peer to separated slow UG makes router re-advertise all routes to slow peer, this will make slow peer in worse situation.
Slow Peer Logic is evaluated based on user defined seconds:
Detect Slow Peer Logic:
- There are at least some messages for which acknowledgements have not been received from neighbor.
- There are some pending messages yet to be written to TCP.
- The time since the last update message timestamp has exceeded the configured threshold (default is 300 seconds)
- The number of refresh sub-groups for the address-family has not exceeded 16.
- The neighbor address-family is not the only member of the sub-group.
- All the other members of the sub-group are already marked as slow peer.
- There are some nets for which updates are yet be generated.
It is AND of all of the above. The reason being, triggering slow peer processing is a complex operation, we don't want to trigger too frequently.
Recover from Slow Peer Logic:
- A peer recovers from being classified as a Slow Peer when all messages queued for slow peer processing have been advertised and acknowledged by the peer.
Detection and Queue Management (This below explained improvement helps to mitigate the above mentioned problem)
When a peer is detected as slow, all messages queued in the peer's main queue are moved to a separate parallel slow peer queue. These messages are advertised separately, while new messages continue to be queued and advertised from the peer's main queue.
If the peer is detected as slow again while already being processed as a Slow Peer, the process of moving messages to the parallel slow peer queue and separate advertisement is repeated. This process continues until the peer is no longer detected as slow.
During the simultaneous processing of messages in both the main queue and the parallel slow peer queue, the order of advertisement for updates and withdrawals are maintained for each route.
During update generation, when a route is churning, the main queue may contain multiple withdrawals and updates for the route. When messages are moved from the main queue to the slow peer queue, only the last state of the route is queued to the parallel slow peer queue. This approach is advantageous when routes are churning in the network.
Recovery
Once the Slow Peer has completed processing (advertised and acknowledged by the peer) all the messages in the slow peer queue, the slow peer queue is deleted, and the peer is no longer considered a Slow Peer.
Slow Peer (BGP Global Configuration)
Slow peer feature is disabled by default starting from 791. Only detection is enabled. So, you need global knob to enable at the system level.
router bgp <>
slow-peer dynamic
and then you can disable at peer level if needed.
Configuration
This example below shows how to enable dynamic slow peer on all (default VRF and non-default VRF) BGP neighbor address-families:
Router#configure
Router(config)#router bgp 100
Router(config-bgp)#slow-peer dynamic
Router(config-bgp)#commit
This example below shows how to disable slow peer on all (default VRF and non-default VRF) BGP neighbor address-families:
Router#configure
Router(config)#router bgp 100
Router(config-bgp)#slow-peer detection-disable
Router(config-bgp)#commit
This example below shows how to enable dynamic slow peer with detection threshold of 120 seconds on all (default VRF and non-default VRF) BGP neighbor address-families:
Router#configure
Router(config)#router bgp 100
Router(config-bgp)#slow-peer dynamic threshold 120
Router(config-bgp)#commit
Reference CCO document
https://www.cisco.com/c/en/us/td/docs/routers/asr9000/software/asr9k-r7-9/routing/configuration/guide/b-routing-cg-asr9000-79x/implementing-bgp.html#bgp-slow-peer-detection