Re: experience on creating instances in scotty-2.0.2 agent (repost)

Juergen Schoenwaelder (schoenw@ibr.cs.tu-bs.de)
Mon, 6 May 1996 21:38:28 +0200

Hi!

Robert Premuz <rpremuz@srce.hr> said:

Robert> The main point of the message is, in fact, my little research
Robert> on the speed of creating instances.

Robert> When a lot of instances are created at once, for example while
Robert> updating a conceptual table holding a few thousands of
Robert> variables in its rows and columns, it is important that the
Robert> creation of instances is as fast as possible. To measure a few
Robert> different possibilities in using 'snmp# instance' command, I
Robert> wrote the small agent script given at the end of the
Robert> message. If you run it, it will show you that:

Robert> using the OID of an instance for defining the instance to be
Robert> created (in the _label_ argument of the 'snmp# instance'
Robert> command) is much more efficient, than using the object
Robert> descriptors (textual names) from a MIB module.

Robert> Also, when updating a possibly existing instance, it is more
Robert> efficient to check first if the global variable bound to the
Robert> instance already exists, and then to create the instance only
Robert> if the variable does not exist. If the variable already
Robert> exists, then it only needs to be set to the new value of the
Robert> instance. Such checking is faster than the search through the
Robert> instance tree done by the 'snmp# instance' command when
Robert> updating an existing instance.

Robert> Some of the conclusions of this research could be put in the
Robert> scotty documentation so that the unexperienced writers of
Robert> scotty agents do not need to discover all that themselves.

Robert> What do you think about all that? Looking forward to your replies.

Thank you very much for your analysis. However, I do not agree with
your conclusion that we should document this behavior in the
documentation. Instead, we should fix the implementation. I got a
ratio speed1/speed3 of 76 which should be considered a bug. I will run
a profiler on it to see where things are getting wrong. I already have
the test script for it. :-)

Thanks again for your analysis and sorry for the long delay,

Juergen