I have a working net-snmp application, with my own MIB.

My MIB has a number of statically-sized tables. I have increased the
size of one of those tables to 10,000 rows. (It was less than 1000 rows
previously).

At start-up, my code executes

    entry = SNMP_MALLOC_TYPEDEF (struct my_table);
    row = netsnmp_tdata_create_row ();
    ...
    netsnmp_tdata_row_add_index (row, ASN_INTEGER, &entry->item, sizeof
(item));
    netsnmp_tdata_add_row (table_data, row);

for each row. This takes a long time - about 30 seconds.

(The table is read-only. It has about half a dozen columns, each of
which is a simple integer or truth value. The index is the first column,
which is not-accessible. The 'my_table' struct only has the index value
in it; SNMP 'get's use the index to retrieve the actual data from the
application.)

Is there a way to reduce the time it takes to create this table?

(Putting in log statements, e.g. after every 1000 rows, shows the
insertion to be taking order-N^2 time. Would inserting the rows
backwards make any difference?)

net-snmp version: v5.3.0.1. (I am considering updating to a newer
version.  But that won't necessarily solve this issue.)

-- James


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to