On Sun, 8 Jan 2006 16:06:32 +0200 Michael wrote:
MG> I would like to implement a mib table.
MG> I want to save some memory, and I don't want to keep the table in memory
MG> all the time. I want to fetch (from some other module) and retrieve the
MG> needed information for the specific object when I will be asked to do so.
MG> Please recommend me the suitable mib2c option.

You have a few basic options:

1) use the iterate helper. For each request you will have to fetch all the
data from the other module to find the right row for the request. This will be
very inefficient. A little memory for caching can reduce the IO to the module,
but searching will still be relatively inefficient.

2) use the MFD helper, but only cache the index information. You will have to
fetch all the data from the module whenever the cache is reloaded
(configurable), but searching while the cache is fresh will be fast. If you
can get add/delete info from the module, you can keep the cache fresh w/out
having to constantly fetch all the data.

3) use any container based helper with a custom container to only retrieve the
minimal amount of data. This will be the most efficient method, but will only
work under certain conditions (depending on the indexes and the api to the
module with the data).

I'd recommend trying 2 first, and seeing if index caching uses more memory
than you want. Then try 1, and see if it's too slow.

-- 
NOTE: messages sent directly to me, instead of the lists, will be deleted
      unless they are requests for paid consulting services.

Robert Story; NET-SNMP Junkie
Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp>
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders>

You are lost in a twisty maze of little standards, all different. 


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to