Re: Startup overhead with v1 and v2u but not v2c?

Juergen Schoenwaelder (schoenw@gaertner.de)
Tue, 22 Apr 1997 07:37:01 +0200

Steve Foley <steve@turing.cs.hmc.edu> said:

Steve> Im running 3 copies of the snmpd that is distributed with
Steve> scotty (each with a different port and different version of
Steve> snmp, v1, v2c, v2u). This machine is a Sun Ultra 2 with very
Steve> little load and 64 megs of memory. The manager is a Pentium
Steve> Pro 180 with 64 megs of ram and very low load.

Steve> The script I am using to test makes use of the 'time' in Tcl
Steve> (7.6). I sequentially time 1 iteration, 2, 3, 4...10
Steve> iterations of simply opening a session, getting the sysUpTime,
Steve> and closing the session. When I do this, I get about 330,000
Steve> microseconds for an SNMPv1 connection. With SNMPv2u, I get
Steve> about 370,000 microseconds, but for an SNMPv2c connection, I
Steve> get less than 2000. When I do this with two iterations, all
Steve> the versions fall back down to less than 2000 and approach a
Steve> 'stable' about of time.

2000 microseconds looks reasonable. Your measurements that result in
> 300000 microseconds look very strange. Note, the first time you
create a session, you can be hit by the loader of the MIB
definitions.

Steve> I expect there to be some overhead with opening and closing
Steve> sessions, and I do observe a curve in the plotted data
Steve> indicating an initial startup cost (Im assuming this is some
Steve> sort of caching on the agent side), but NOT with v2c. Im
Steve> wondering if this is Tcl acting funny or if there are
Steve> significant differences between the v1, v2u and v2c code. Can
Steve> anyone explain what is going on here (or at least suggest if
Steve> it is the manager or agent that is creating the lag)?

Creating sessions is usually a fast operation. However, if you create
a session for the first time and you have not yet used a `mib'
command, all the MIBs defined in the tnm(mibs) and tnm(mibs:core) will
be loaded. This might take some noticeable time. There is as far as I
know no difference in the v1, v2c and v2u code in this respect.

Steve> If anyone would like to see data or code, let me know, I would
Steve> be happy to pass it along. Oh, BTW, this doesnt happen if I
Steve> leave the connection open and time the GETs I do of sysUpTime.

A portable piece of code really helps to understand what exactly you
are doing and where the problem might be. I am pretty sure that you
were hit by MIB loading times and not by slow code to create sessions.

Juergen

-- 
Juergen Schoenwaelder     <schoenw@gaertner.de>     (Tel: +49-531-23873-0)
Gaertner Datensysteme, Hamburger Strasse 273a, 38114 Braunschweig, Germany
--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.