Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Configure Options on Managed Devices for Better SNMP Response Time

The following sections contain information about configuration options on the managed devices that can enhance SNMP performance:

Enable the stats-cache-lifetime Option

Junos OS provides you with an option to configure the length of time (in seconds) the interface stats are cached. If the NMS queries again for the same interface within the cache time, the same data is returned. If the NMS queries after the cache time, the cache is no longer valid, fresh data is fetched from the lower layers, and the cache timestamp is updated. The default stats-cache-lifetime is 5 seconds. This can be tuned as per the polling frequency.

Note:

Reducing the value of the stats-cache-lifetime option results in more queries and can impact performance. To get the live uncached statistics, set the value of the stats-cache-lifetime option to 0. However, this is not recommended since it completely disables the caching feature and impacts performance.

Filter Out Duplicate SNMP Requests

If a network management station retransmits a Get, GetNext, or GetBulk SNMP request too frequently to a device, that request might interfere with the processing of previous requests and slow down the response time of the agent. Filtering these duplicate requests improves the response time of the SNMP agent. The Junos OS enables you to filter out duplicate Get, GetNext, and GetBulk SNMP requests. The Junos OS uses the following information to determine if an SNMP request is a duplicate:

  • Source IP address of the SNMP request

  • Source UDP port of the SNMP request

  • Request ID of the SNMP request

Note:

By default, filtering of duplicate SNMP requests is disabled on devices running the Junos OS.

To enable filtering of duplicate SNMP requests on devices running the Junos OS, include the filter-duplicates statement at the [edit snmp] hierarchy level:

Exclude Interfaces That Are Slow in Responding to SNMP Queries

An interface that is slow in responding to SNMP requests for interface statistics can delay the kernel responses to SNMP requests. You can review the mib2d log file to find out how long the kernel takes to respond to various SNMP requests. For more information about reviewing the log file for the kernel response data, see “Checking Kernel and Packet Forwarding Engine Response” under Monitoring SNMP Activity and Tracking Problems That Affect SNMP Performance on a Device Running Junos OS.

If you notice that a particular interface is slow in responding and think that it is slowing down the kernel from responding to SNMP requests, exclude that interface from the SNMP queries to the device. You can exclude an interface from the SNMP queries either by configuring the filter-interface statement or by modifying the SNMP view settings.

The following example shows a sample configuration for excluding interfaces from the SNMP Get, GetNext, and Set operations:

The following example shows the SNMP view configuration for excluding the interface with an interface index (ifIndex) value of 312 from a request for information related to the ifTable and ifXtable objects:

Alternatively, you can take the interface that is slow in responding offline.