I wrote a simple agent extension (dynamically loaded at startup as a shared object) that manages read-write and read-only scalars variable. Of course, I used scalar helper and wrote a callback for each variable.
In the handler function I retrieve the value of the variables requested by accessing a slow RS485 serial bus (actually, the value of variables in stored inside a differente embedded device connected to the agent box with a serial bus). The response time for a single variable GET is acceptable and it is about 100ms. The problem arises with multiple-variables requests. The callback is called for each variable and the serial bus is accessed many times, increasing the overall response time (for N variables, it is around N * 100ms). I understood the scalar helper uses serialize helper that converts the multiple variables requests in many single requests, so the callback is called many times. One idea to reduce the response time is to avoid the serialization of requests and manage the multiple variables directly in the callback so I can access the serial bus just one time for the entire set of variables. So the question is: how to avoid serialization and multiple calls of callback? Are there examples in the Net-SNMP mib implementations? Another idea would be the use of caching data helper, but I don't if it could be a real solution. Consider that many variables accessed from the serial bus are analog signals (voltages, currents, ...) and they may change frequently over time, so the cache timeout period could be around 100-500ms, no more. Usually the user polls the agent every 1-10s with multiple-variables requests, so the serial bus access won't be avoided. Any other suggestions? ------------------------------------------------------------------------------ Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
