[rrd-users] Re: increase performance

Simon Leinen simon at limmat.switch.ch
Wed Aug 29 10:28:59 MEST 2001


>>>>> "mw" == Mike Wright <Mike at auckland-services.freeserve.co.uk> writes:
> Third Method.

> my @interfaces = (1,2,3,4,5,6,7,8,9,10);
> my @mibs;
> for my $if (@interfaces) {
>   push @mibs, "ifInOctets.$if";
> }
> my @in_octets = &snmpget ($device, at mibs);

> This will retrieve all the mibs in a single request, taking just
> 100ms.

Just make sure that you don't run into problems with the PDU size
limitation.  In your example there won't be any problem, as the size
of the response should be about 240 bytes, depending on the length of
the community string and the size of the counter values returned.

But when you do this with more variables, or when the variable values
in the response can get big (for example: interface description
strings etc.), you could receive a tooBig error.  In that case you'd
have to start over with multiple smaller requests.

> Using SNMPv2's "getbulk" would work in a similar way, returning
> multiple table rows in one response but unfortunately not all
> devices support SNMPv2.

Yes.  Note that your first method (snmpwalk) would automatically use
get-bulk if $device specifies SNMPv2c, and copes with PDU size
limitations automatically (because get-bulk handles those in a more
transparent way).

But if you know which instances you need, and can handle the PDU size
limitations, a multi-variable get should be more efficient than
get-bulk.
-- 
Simon.

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list