On Wed, 7 Jul 2004 18:28:45 +0100 [EMAIL PROTECTED] wrote: HKC> > I have coded my own MIB module based on a stub file that was HKC> > originally auto-generated by mib2c using mib2c.iterate.conf,v HKC> > 5.5. The module contains a table with 7 columns and currently HKC> > 120 rows. [...] I was quite surprised to see that the functions HKC> > get_first_data_point and get_next_data_point both together HKC> > get called 58080 times if I get the table using GETBULK HKC> > messages. HKC> HKC> After looking at this again I figured the math is like this: HKC> number_of_accessable_columns * rows * (rows + 1) HKC> or HKC> number_of_accessable_columns * (rows^2 + rows) HKC> HKC> So for my table with 120 rows this would be HKC> 4 * 120 * (120 + 1) = 58080 HKC> HKC> Unfortunately my table could return far more than 120 rows and I am afraid HKC> this n-squared behaviour will bring my processor to it's knees. Well, I HKC> guess I just have to live with it.
What release of net-snmp are you using? Based on version 5.5 of iterate.conf, it's 5.0.x, right? There have been some improvements in the iterator in 5.1.x. (At the very least, I believe it will change the number_of_accessable_columns to a fixed value of 1) Try 5.1.1.pre3. If you don't mind caching, then the stash cache helper would help. There a lots of different ways of optimizing, using various different handlers and helpers. It just depends on your data, and how much extra work you want to do. -- Robert Story; NET-SNMP Junkie <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp> Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users> You are lost in a twisty maze of little standards, all different. ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ 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