Forum Discussion
Hamish
Apr 08, 2010Cirrocumulus
Hmm... I don't have numbers, but lets compare the two protocols... On the one hand we have SNMP... The query is a simple OID 'string' of numbers... e.g. .1.3.6.... And is a few Bytes long... The query will be carried in a single UDP packet... The response is going to be in 1 or more UDP packets 'streamed' from agent (F5) to manager... And is of the form OID & data... There's no wasted data or packets. At the agent it's should be as simple as grabbing data from a table, and sending the OID and the data... Quick & easy. You can implement this in a few kB or less (Yes you can make it more complex, but you don't need to). Tables (In v2+) are pulled with one query (v1 requires query/resp/query/resp).
But with iControl... It's a whole different story... I'm not sure who came up with the original idea for XML, but they should be... reeducated shall we say... Lightweight is isn't... Readable, well that's a matter of opinion... I'm sure there's some people that enjoy reading XML, but I'm not one of them. Lets see... First you open a TCP connection... Just the handshake will consume as much bandwidth and processing as a typical snmp_get/response. Then you have the SSL negotiation... Lots more processing... Then an HTTP GET. And a whole lot of XML encoded data... That you just spent precious cycles encoding... Then the server has to pass that to some process to decode the XML (Ohh boy... Lots more cycles), THEN and only then can the agent grab the data you're looking for. But it's not finished yet... A few million more cycles to encode that data into XML (And why doesn't XML have a 64-bit ordinal type anyway?) and stream all that data back to the manager...
Hmm... It would be nice to stick a profiler on the code and see what sort of difference there is between the same queries for stats in iControl and SNMP...
The saving grace for iControl, is that in older versions it looked like the SNMP agnet was having to talk to something else to pull the data. And that looked pretty heavy... But I know for sure that trolling the config every 5 minutes and pulling stats on a few dozen VS's, Pools and a few hundred poolmembers and nodes (Once a minute) used to consume up to 25-30% of a 6400 when doing it via iControl... (Oh, and blow out the host memory too. It's got better over the last few years, but like all Java programs, it's not exactly light weight...
H