The other thing that you should consider when seeking to improve timing on SNMP interactions is the manner of data that you are polling:
- Are you unnecessarily iterating through SNMP tables or unwanted OIDs?
- Does the device that you are monitoring supply the requisite information in separate, discrete OIDs?
- Does the device that you are polling support SNMPv2 and in turn, GET-BULK, which is far more efficient for large set retrieval? (See RFC 1187 for details)
These are questions that perhaps might be worth considering before making changes to your processes.
perl -le "print unpack'N', pack'B32', '00000000000000000000001000000000'"