[Twisted-Python] Twisted and SNMP (was: Advice on doing thousands of simultaneous UDP queries with Twisted...)

Justin Warren daedalus at eigenmagic.com
Thu Feb 19 16:48:37 EST 2004

On Tue, Feb 10, 2004 at 10:03:56AM +0100, Thomas Favier wrote:
> Mike C. Fletcher wrote:

> You bring my point with SNMP : I've tried to build a SNMP poller based 
> on twisted and pySNMP. Main trouble i've had is the decoding time of the 
> pure python ASN parser. It spent about 1 full second decoding (packets 
> are about 7ko, as i get all values and tables with a GET-BULK, there is 
> room for improvement by splitting requests, but that's not significant 
> for that matter). So i switched to a threaded implementation using 
> yapsnmp (and ugly deferToThreads). Decoding times are about 0.02 seconds 
> for the same requests. Load on the server was more than halved.

Please forgive the self-linking, but you might like to take a look at
libsnmp: http://seafelt.unicity.com.au/libsnmp. I wrote it to replace
pySNMP in a product we're working on, for various reasons, speed being
one of them. The main difference between the two is that libsnmp isn't
a generic ASN.1 decoder; we've hardcoded things specific to SNMP to
make things faster. It seems to scale quite well so far.

"You've got that exactly backwards.  Windows was a boot loader that was
 mutilated and tortured by sadistic psychopaths of the highest order in
 order to make it superficially resemble an OS."
   -- Paul Tomblin in a.s.r

More information about the Twisted-Python mailing list