Hi Erwan!
I've completed adding all the counters I needed on my test host (manually preparing my counters.ini).
All the functionality is there (Thanks!) but the performance is starting to become an issue. The one second delay to get the "per-second" counters is killing me. Right now, my test system is accessible only over a VPN which has a higher latency than a LAN would, which of course does not help..
Could you please seriously evaluate whether you need to have a full second wait per counter or if shorter values could be used? (1/4 or 1/10 of a second maybe?)
(I know it could skew the results to a certain extent, depending on the calculation you have to perform to scale the result back to a x/sec value...). I wish those values were simple counters so we could let Cacti calculate the average..
Another thing that could possibly help would be to modify the code so that it processes multiple requests in parallel. Right now, if I launch a few snmpwalks in parallel (different shells, for example), it almost looks like if the snmpd.exe is serializing access to your DLL (and maybe it does?).
If I launch 4 walks at the same time on a branch with all per-sec counters, one of them receives an answer each second (so each of them taken separately receives an answer every 4 seconds).
What I mean to say is that if multiple walks could truly run in parallel, the 1 second penalty would not hit me so much. I do run spine with multiple threads and a low number of OIDs per snmpget and this would make the 1 second delay a non-issue.
Right now, polling approximately 220 counters (some every 5 minutes, some every minute), I'm getting close to my time limit before spine decides to drop some OIDs from the list. I'm not even polling many per-second counters yet..
Is it possible to make the DLL use threads or another method of parallelism and/or some workaround to the 1 second delay?
Thanks!
Antoine
PS: I suppose having your DLL process the counters.ini file once at startup, then starting a bunch of threads in the background just to poll all the counters at regular intervals (even if no SNMP request is coming) while updating some piece of shared memory, and having a main thread called by snmpd.exe reading the values from the shared memory to provide the responses would be a major rewrite of your application?
Maybe for v3?