On Sun, 03 Jun 2007 13:31:20 -0400 Glenn wrote:
G> We have a device that will be using net-snmp as our SNMP stack.  The 
G> device uses RAM for the filesystem, and uses flash for persistent 
G> storage. [...]
G> 
G> One of the things we are trying to do is minimize the number of writes 
G> to flash to extend the life of the device.  We have a couple of choices 
G> with the persistent configuration files, namely:
G> 
G> 1) Leave the persistent config files in the RAM filesystem (e.g., 
G> /var/snmp) and copy it to and from flash on startup and shutdown 
G> respectively of the device.
G> [...]
G> 2) Put the persistent config files directly on flash (either ./configure 
G> it to point to our flash filesystem or symlink /var/snmp to somewhere on 
G> flash) and trust that we won't be actually writing to the files that often.
G> [...]

G> Have I missed anything?  Does anyone else have a different opinion?

sure. hack up the code to have persistent store saved in memory during the
store, compare to the current file, and only write once, after all changes have
been seen. Optionally include a delay (reducing the window for loss of info in
case of a crash).

Or do the above, but instead of writing the whole file, just write the diffs
to a new file (and make sure those diffs get read in right at startup), maybe
with a periodic merge back to one file (daily?)

When you get something working, submit a patch! :-)  If you don't have the
time/resources yourself, you could maybe contract it out and give back to the
community...

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to