Re: Loading time of scotty

Juergen Schoenwaelder (schoenw@cs.utwente.nl)
Wed, 19 Mar 1997 20:17:17 +0100

Doug Hughes <Doug.Hughes@Eng.Auburn.EDU> said:

>Does anyone out there know how portable shared memory is across UNIX
>systems? And what about Windows? Has Windows something comparable to
>shared memory?

Doug> I don't know about anybody else, but it gives me shivers just
Doug> thinking about it. :)

Doug> Windows has pretty bad memory management behavior to begin
Doug> with. Perhaps winNT has shared memory, but I don't think 95 or
Doug> 3.11 have anything comparable to the ipcs stuff. Even the
Doug> cross platform Unix stuff can get gnarly (I've heard). Do
Doug> yourself a favor and spare yourself the inevitable
Doug> aneurism. ;)

Well, I think that there is a simple and cross-platform solution:
Compile the MIB data structures into dynamic loadable modules and use
the Tcl dynamic loader to load them at run time. The operating system
will ensure that the module is loaded efficiently in shared memory,
while Tcl will make the whole thing portable.

The remaining question is: How can such a solution be as flexible as
the current solution? A Tcl script has currently full control over the
loaded MIB modules. Keeping this flexibility when using pre-compiled
MIB modules will require substantial changes and very likely create
problems on systems without a working dynamic linker etc.

Doug> I think a memory caching tcp/udp mechanism might be interesting though.
Doug> The first lookup would perhaps take a slight hit, but then it would
Doug> be cached in memory for later use. The server process would serve
Doug> up MIBS as needed from a memory base.

What are we going to optimize?

a) Memory usage by the Tnm extension?
b) Startup time (or better MIB loading time) of the Tnm extension?
c) Both?

A MIB server can reduce the startup time, but it does not necessarily
reduce memory usage (think of a MIB browser which walks all the MIB
definitions). Its likely that you will pay for reduced startup time
with somewhat increased processing time for SNMP interactions. The
overall effect for long running scripts will likely be a performance
loss.

I think we should only consider solutions that are at least as fast as
the current solution during normal SNMP PDU processing. Memory usage
can be reduced by sharing the MIB data between processes. Loading time
can be reduced by memory mapping MIB data without the need to build
the tree structure during loading time.

Is the problem serious enough to work on it? I can for example change
the default configuration to only load the core MIBS. This forces
people to add those MIBs that they really need. (The default is
currently to load all the IETF RFC MIBs.) This is cheap to implement
and probably solves the problem for most people. Comments?

Juergen

-- 
Juergen Schoenwaelder schoenw@cs.utwente.nl http://www.cs.utwente.nl/~schoenw
Computer Science Department, University of Twente,   (Fax: +31-53-489-3247)
P.O. Box 217, NL-7500 AE Enschede, The Netherlands.  (Tel. +31-53-489-3678)
--
!! 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.