Couldn't sleep for ideas popping into my head for Cinemon, so spent a few hours on various approaches to speeding things up. Spent some time trying to get yapsnmp compiled, eventually just gave up after I finally got it to compile and the silly make file didn't install the c module.
Then played around with various low-level and grotty ideas (e.g. string-slinging) until I decided the best "can get it done tonight and it's not half bad looking" project would be to teach TwistedSNMP how to cache queries so that, when running millions of identical queries you're not wasting huge amounts of time building the query objects.
I'm also thinking I may teach OIDs (at least) how to cache their BER encodings so that one would do something like internOID( value ) and it would be registered in a cache mapping string-form: OID, OID: BER encoding and maybe even BER: OID for incoming-message handling. Again, we're encoding the same (single and root) OIDs millions of times a week, may as well cache the snot out of them so their entire BER encoding load is a hash-table lookup.
Heck, if we wanted to be a bit more profligate with the ram we could just cache *every* OID. Sure, there'd be a leak as new OIDs show up on the systems, but the churn isn't really all that huge.
Long story short, I think I may have seen the path to actually reaching the performance goals, asssuming all this really does have the effect I'm expecting on the real-world system.
Pingbacks are closed.