You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

SNMP is a fairly complex protocol, and the fact that it primarily operates over UDP does not exactly help matters. As a consequence there are a number of potential problems that affect NMIS' ability to collect information from SNMP agents efficiently and quickly.

snmp_max_msg_size

The primary tunable NMIS configuration setting for SNMP is snmp_max_msg_size, which controls how large a single SNMP packet may be.

This can be set as a system-wide default (in the System menu, under System Configuration), or as a per-host setting (in the Edit Node menu, under Advanced Options).

The default for snmp_max_msg_size is 1472 bytes, just below the 1500 byte packet limit for normal Ethernets. In LAN-only scenarios it is possible to increase this past 1500 bytes: this causes IP fragments and packet reassembly, but unless your LAN is saturated and starving for bandwidth fragmentation is not a problem. The benefit of a larger SNMP packet would be that the data to be collected fits into fewer  packets.

snmp_max_repetitions

This option was added in NMIS 8.5G. It controls how many SNMP PDUs will be packaged into a single SNMP packet. The snmp_max_repetitions setting is named a bit oddly - that comes  from the SNMP module that NMIS uses: Net::SNMP calls it "-maxrepetitions".

This option can only be set for specific hosts, and is not available for SNMP version 1.

Its primary purpose is to overrule Net::SNMP's heuristic for maximising the efficiencey of bulk transfers: the goal is to fit the maximum number of PDUs into each packet, which of course depends on the size of the PDUs (and their sizes are unknown until the operation is attempted). Like any other heuristic this one can fail under certain circumstances: If large SNMP tables are collected then it may be necessary to reduce this setting to 10-20 (when used with the default packet size). We have observed this problem in a small number of situations, for example when collecting virtual machine info from VMware ESXi hosts - the strings contained in these tables are really long.

If you observe SNMP error messages in the logs which look similar to "SNMP ERROR (X) (Y) The message size exceeded the buffer maxMsgSize of N", then you should set a lower snmp_max_repetitions value (or increase the snmp_max_msg_size if you're operating in a LAN-only scenario). Otherwise a value of 40-50 minimizes the number of SNMP packets and thus speeds up collection. Not setting this option at all leaves it to the Net::SNMP module to guess a suitable value.

There is one special setup for snmp_max_repetitions: if it is set to 0 or 1, then the efficient bulk transfer is disabled and a slower but more robust transfer mechanism is employed.

 

  • No labels