> From: Robert Story (Users)
> Sent: 08 July 2004 01:25
> 
> On Wed, 7 Jul 2004 18:28:45 +0100 holger 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 
> HKC> > 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 
> HKC> rows and I am afraid
> HKC> this n-squared behaviour will bring my processor to it's 
> HKC> knees. Well, I 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?

Errrm, I guess I have created the stub file using 5.0.x. But the agent I am using is 
actually 5.1.2.pre2.
 
> 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.

The data I am accessing is in a shared memory area. It is already ordered but might 
have gaps in it (ie. some rows might be missing).
I will have a look at the stash cache helper stuff. Is there an existing MIB module I 
could have a look at on how it's done?

Thanks

Holger


-------------------------------------------------------
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

Reply via email to