High CPU Usage When Polling Routing ARP Tables
Using SNMP to poll large routing tables and Address Resolution Protocol (ARP) tables can cause performance problems on the Cisco routers. This section provides background information about the issue and how to avoid the problem.
An SNMP network management station can query a router to learn about other networks. The management station uses this routing information to find other routers and query them about the networks around them. This allows the management station to learn the topology of the entire network.
The router stores the routing table in hash format, which allows the router to quickly and efficiently search the table. However, RFC 1213 requires that SNMP return the routes in lexicographical order, which means they are listed by their OIDs, in the order in which they occur in the OID tree.
This means that for each SNMP request for routing information, the router must sort entries into the OID order before it builds the response protocol data unit (PDU). As the size of the routing table increases, the router must take a proportionately longer time, along with higher CPU processing levels, to sort the table entries.

________________________________________
Note: The number of CPU cycles needed to respond to a request for the entire routing table depends on the size of the table (more routes require more CPU cycles). Therefore, even if your router does not currently exhibit CPU spikes, it might begin to do so as the size of the routing table increases.
________________________________________
To the CPU scheduler, SNMP is a low-priority process. This means that the CPU processes non-SNMP requests before it processes SNMP requests. Therefore, any CPU spikes that might occur during SNMP route polling should not affect router performance.

Enabling CEF Fast Switching on the Router
To avoid the performance problems that can occur when SNMP GET-NEXT requests are used to retrieve the routing table or the ARP table, enable Cisco Express Forwarding (CEF) fast switching on the router. This is because the router processes SNMP requests differently, depending on whether fast switching is enabled:

  •  When fast switching is not enabled, the router uses information in the Routing Information Base (RIB) to respond to SNMP requests for the routing table or the ARP table. Entries in the RIB are not sorted by their OID, so the router must first sort these tables by their OID values, resulting in higher CPU usage.
  •  When fast switching is enabled, the router uses information in the Forwarding Information Base (FIB) to respond to SNMP requests for the routing table or the ARP table. FIB entries are stored in lexicographical order, listed by the router OID. 

Therefore, the router does not have to sort the routing tables before replying to SNMP requests, improving response time and reducing CPU usage.