Best practices with snmpwalk / snmpbulkwalk ? Single root tree query versus several sub-queries

Johan Kuuse <[email protected]> Wed, 21 Aug 2024 09:42:51 +0200
Newsgroups gmane.network.net-snmp.user
Message-ID <CAESSPia4St+LDTuq0otnwgn12H21nE8Vurc1vgx-e=1dgGg=9w@mail.gmail.com>
--===============6680405707896899827==
Content-Type: multipart/alternative; boundary="0000000000001e87bd06202cb143"

--0000000000001e87bd06202cb143
Content-Type: text/plain; charset="UTF-8"

Hi,

Generally speaking, which of the following gives the best performance?

a. One single SNMP query at "root level", one single SNMP request, but with
a "big" response, causing more network traffic, returning lots of
information, some to be filtered out.
b. Several SNMP queries at "sub level", several SNMP requests, "smaller"
responses with less network traffic, no or little need to filter out
information.


Here is an explicit example, getting LLDP info via SNMP:

a. One single query - gets all information from this tree, which also
includes information not to be used/filtered out.

1.0.8802.1.1.2.1.4                   # lldpRemoteSystemsData

b. Several subqueries - get only data I am interested in from the tree
above.

1.0.8802.1.1.2.1.4.1.1.4.0 # lldpRemChassisIdSubtype
1.0.8802.1.1.2.1.4.1.1.5.0 # lldpRemChassisId
1.0.8802.1.1.2.1.4.1.1.6.0 # lldpRemPortIdSubtype
1.0.8802.1.1.2.1.4.1.1.7.0 # lldpRemPortId
1.0.8802.1.1.2.1.4.1.1.8.0 # lldpRemPortDesc
1.0.8802.1.1.2.1.4.1.1.9.0  # lldpRemSysName
1.0.8802.1.1.2.1.4.1.1.10.0  # lldpRemSysDesc
1.0.8802.1.1.2.1.4.2.1.5.0 # lldpRemManAddrOID


Even if option b. obviously implies more SNMP requests, the sum of the size
of the SNMP responses is smaller than for option a.
But should one take into account any overhead for each request/response? Or
is that ignorable from a performance perspective?

Also, what about the CPU load on the remote system, comparing option a. and
option b.?

Best Regards,
Johan Kuuse

--0000000000001e87bd06202cb143
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi,</div><div><br></div><div></div><div>Generally spe=
aking, which of the following gives the best performance?<br></div><div><br=
></div><div>a. One single SNMP query at &quot;root level&quot;, one single =
SNMP request, but with a &quot;big&quot; response, causing more network tra=
ffic, returning lots of information, some to be filtered out.</div><div>b. =
Several SNMP queries at &quot;sub level&quot;, several SNMP requests, &quot=
;smaller&quot; responses with less network traffic, no or little need to fi=
lter out information.</div><div><br></div><div><br></div><div>Here is an ex=
plicit example, getting LLDP info via SNMP:</div><div><br></div><div>a. One=
 single query - gets all information from this tree, which also includes in=
formation not to be used/filtered out.<br></div><div><br></div><div>1.0.880=
2.1.1.2.1.4 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
# lldpRemoteSystemsData</div><div><br></div><div>b. Several subqueries - ge=
t only data I am interested in from the tree above.<br></div><div><br></div=
><div>1.0.8802.1.1.2.1.4.1.1.4.0 # lldpRemChassisIdSubtype<br>1.0.8802.1.1.=
2.1.4.1.1.5.0 # lldpRemChassisId<br>1.0.8802.1.1.2.1.4.1.1.6.0 # lldpRemPor=
tIdSubtype<br>1.0.8802.1.1.2.1.4.1.1.7.0 # lldpRemPortId<br>1.0.8802.1.1.2.=
1.4.1.1.8.0 # lldpRemPortDesc<br>1.0.8802.1.1.2.1.4.1.1.9.0=C2=A0 # lldpRem=
SysName<br>1.0.8802.1.1.2.1.4.1.1.10.0 =C2=A0# lldpRemSysDesc<br></div><div=
>1.0.8802.1.1.2.1.4.2.1.5.0 # lldpRemManAddrOID</div><div><br></div><div><b=
r></div><div>Even if option b. obviously implies more SNMP requests, the su=
m of the size of the SNMP responses is smaller than for option a.</div><div=
>But should one take into account any overhead for each request/response? O=
r is that ignorable from a performance perspective?<br></div><div><br></div=
><div>Also, what about the CPU load on the remote system, comparing option =
a. and option b.? <br></div><div><br></div><div>Best Regards,</div><div>Joh=
an Kuuse<br></div></div>

--0000000000001e87bd06202cb143--


--===============6680405707896899827==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============6680405707896899827==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

--===============6680405707896899827==--