[AGENT++] SNMP v3 get performance
Frank Fock
fock at agentpp.com
Tue Mar 21 00:11:00 CET 2006
Hi John,
You can discovered the engine ID by sending a single
SNMPv3 PDU. I think SNMP++ already provides such a
function.
Frank
John McCaskey wrote:
> Hi Frank,
>
> Thanks for the response. The only issue I see with your approach is
> that I don't know the remote agents engine IDs. If I try to go with
> that approach is there a good efficient way to discover the engine IDs
> as well, or will I need to gather and know them upfront if I'm to
> achieve good performance?
>
> John
>
> On 3/20/06, *Frank Fock* <fock at agentpp.com <mailto:fock at agentpp.com>> wrote:
>
> Hi John,
>
> I think adding localized users only will provide
> best performance. As you know the user/passphrase
> combination for all agents, you can localize them
> with the agent's engine IDs and add them all to
> the USM before you start polling. After that, you
> do not need to modify the USM anymore.
>
> Best regards,
> Frank
>
> John McCaskey wrote:
> > Everyone,
> >
> > Using the patch I previously provided for per session v3MP
> objects I have my
> > polling engine running and stable using SNMP++ for all of our SNMP
> > requests. I have 80 threads that get spawned, each create's it's
> own v3MP
> > object, and each checks a global queue for devices that need SNMP
> polling.
> > Each thread then once it has a device sets up a new snmp session,
> which
> > includes doing a usm->add_usm_user() call if the device is using
> v3, and
> > then issues SNMP get requests on groups of OIDs until it has
> gathered all
> > the data needed for the device.
> >
> > This works well, but the performance when polling a large number
> of v3
> > devices is pretty bad. For v1 I can poll several thousand
> devices in a
> > matter of a minute or two and performance is quite good on par
> with Net-SNMP
> > which we used previously. However, if I have just a couple
> hundred v3
> > devices the performance starts to crawl. Under my linux build
> I've been
> > using oprofile to gather some performance data and it seems that
> the bulk of
> > the time is being spent in the MD5 routines, I'm testing with a
> security
> > level of authPriv using MD5/DES. Here is the output from oprofile:
> >
> > CPU: P4 / Xeon with 2 hyper-threads, speed 2592.35 MHz (estimated)
> > Counted GLOBAL_POWER_EVENTS events (time during which processor
> is not
> > stopped) with a unit mask of 0x01 (mandatory) count 100000
> > samples % linenr info symbol name
> > 9306146 64.4420 md5c.cpp:220 MD5Transform
> > 3414196 23.6422 auth_priv.cpp:1040
> AuthMD5::password_to_key(unsigned char
> > const*, unsigned int, unsigned char const*, un
> > signed int, unsigned char*, unsigned int*)
> > 821898 5.6914 md5c.cpp:332 Decode
> >
> > I'm interested in any suggestions on cutting down this time. I
> know Jochen
> > already mentioned that I shouldn't keep calling add_usm_user if
> the user has
> > already been added previously, but given that each device may
> have any
> > user/password combination and I have no way of knowing whether a
> device may
> > use the same username as another, but have a different password I
> don't see
> > how I can avoid that. It seems like maybe what I need is for the
> table of
> > added users inside snmp++ to be a little smarter and not lookup
> by just
> > username but also by password so that whenever I add it will
> reuse if an
> > exact match exists otherwise add the user again and perform the MD5
> > computations again. Does that seem like the best approach to
> improving
> > performance?
> >
> > John McCaskey
> > Klir Technologies, Inc.
> > _______________________________________________
> > AGENTPP mailing list
> > AGENTPP at agentpp.org <mailto:AGENTPP at agentpp.org>
> > http://lists.agentpp.org/mailman/listinfo/agentpp
>
> --
> AGENT++
> http://www.agentpp.com
> http://www.mibexplorer.com
> http://www.mibdesigner.com
>
>
--
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com
More information about the AGENTPP
mailing list