[SNMP4J] Multithreaded asynchronous requests

Frank Fock fock at agentpp.com
Fri Jun 27 22:12:22 CEST 2008


Hi Paul,

I would use the first approach with a single Snmp instance.
If you use more threads you get less throughput.
When using UDP, the incoming UDP buffer size of the OS
could be a limiting factor, so using a multi-threaded
dispatcher is recommended to make sure that the incoming
buffer is read immediately when new data arrives.

Hope this helps.

Best regards,
Frank


Paul Ferreira wrote:
> Hi,
> 
> i'm trying to send asynchronous snmp get requests (in high volumes) in a multithreaded environment.
> 
> I have several questions, but the first one would be regarding the "strategy" to follow. I am not quite sure which way to go:
> 
> -use a single Snmp  instance, with a single instance of DefaultUdpTransportMapping (hence a a single listener thread for all requests) coupled with a single instance of MultiThreadedDispatcher (and his ThreadPool) to process the incoming messages.The pros would be to stay in control of the number of listening and processing threads. The cons?
> -use a Snmp  instance per request, with an instance of DefaultUdpTransportMapping (hence a listener thread per request) coupled with an instance of MultiThreadedDispatcher per request , but, using a unique instance of ThreadPool for all instances of MultiThreadedDispatcher.
> The pros would be to have the "safety" of a listener thread per request. The cons : as many listener threads as requests ...
> 
> What do you think? has anyone been doing this kind of thing?
> 
> Thanks in advance 
> 
> Paul
> 
> 
> 
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com



More information about the SNMP4J mailing list