[SNMP4J] Multithreading Issues with Snmp4j

Akshat Kakkar the_akshat at yahoo.co.in
Mon Aug 22 08:51:44 CEST 2016


But I need to send 500 parallel queries to 500 different devices. If there is no separate port for each instance, how will the response from devices be processed?
 

    On Thursday, 11 August 2016 1:58 PM, Frank Fock <fock at agentpp.com> wrote:
 

 Hi 
You are binding a new port with any new Snmp instance. That's a big performance overhead that is not needed. Simply use a single Snmp instance instead.
Best regards 
Frank

> Am 10.08.2016 um 10:25 schrieb Akshat Kakkar <the_akshat at yahoo.co.in>:
> 
> Hi!I am using snmp4j version 2.2.1 for my java development. When I am sending snmp-get query to 1 or 2 device in parallel, then I am seeing that following code is taking around 15-16 mill seconds.
> Snmp snmp = new Snmp(dutm);snmp.send(sendPDU, udpTarget, null, responseListener);
> However, if I increase number of threads from 2 to 100, above code takes around 100 milli seconds.And if number of threads are increased to 500, time taken by above code increases to around 650 milli seconds.I am measuring time by using System.nanoTime() method in Java.
> Can anyone please help to explain this?
> 
> -Akshat
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> https://oosnmp.net/mailman/listinfo/snmp4j


   


More information about the SNMP4J mailing list