The Border Gateway Protocol (BGP) scanner process goes through the BGP table to verify next-hop reachability. This can cause high CPU conditions. When the BGP scanner runs, low priority processes, such as Internet Control Message Protocol (ICMP) take longer to access the CPU. This causes the ICMP packets sourced from, or destined to, the router to experience latency. Pings sent through the router will be Cisco Express Forwarding (CEF) switched, so no latency should be seen for those ICMP packets.
When troubleshooting periodic spikes in latency, compare the forwarding times for the packets forwarded through a router against the packets processed directly by the CPU on the router. The duration of the high CPU condition varies based on a number of conditions, in particular the size of the Internet routing table and the number of routes that a particular router holds in its routing and BGP tables.Ping to the router and Ping from the router contains ICMP Echo packets which are treated as low priority packets.So more time is taken by the router to process the Ping packets.This causes Ping packets to experience high latency.