Configuring Options on Managed Devices for Better SNMP Response Time

This section contains information about configuration options on the managed devices for enhancing SNMP performance. For more information, see the following sections:

Enable the stats-cache-lifetime Option

Junos OS provides you with an option to configure the length of time an SNMP request stays active and queued so as to reduce the possibility of request drops during slow-response times. You can use the set snmp stats-cache-lifetime seconds configuration mode command to specify the length of time for an SNMP request to remain queued. The recommended value for stats-cache-lifetime is in the range of 30 to 60 seconds.

Note: The set snmp stats-cache-lifetime seconds command is a hidden command and is supported only on devices running Junos OS Release 9.3 and later.

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. Junos OS enables you to filter out duplicate get, getNext, and getBulk SNMP requests. Junos OS uses the following information to determine if an SNMP request is a duplicate:

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

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

[edit snmp]filter-duplicates;

Exclude Interfaces That are Slow in Response from SNMP Queries

If an interface is slow in responding to SNMP requests for interface statistics, that can delay kernel responses to SNMP requests. You can review the mib2d log file to find out the time taken by the kernel to respond to various SNMP requests. For more information on reviewing the log file for information about kernel responses, see the section “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:

[edit]snmp {filter-interfaces {interfaces { # exclude the specified interfacesinterface1;interface2;}all-internal-interfaces; # exclude all internal interfaces}}

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

[edit snmp]view test {oid .1 include;oid ifTable.1.*.312 exclude;oid ifXTable.1.*.312 exclude}

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

Related Topics