Forum Discussion
DevBabu_124276
Nimbostratus
Mar 31, 2016Regarding optimization of iControl REST- PYTHON code
This code calls the iControl REST API provided by BIG-IP LTM. Trying to get the list of the pools, it's current status and the pool members associated with the pool. My code works like this, base...
Hannes_Rapp
Nimbostratus
Apr 01, 2016Your problem is serial-execution, or in other words - lack of parallelism.
If you have Python2.5 or older, use threading.Thread: https://docs.python.org/2/library/threading.htmlthreading.Thread
If you have Python2.6 or newer, use multiprocessing https://docs.python.org/2/library/multiprocessing.html
- Threading will enable you to run multiple IO-wait streams but you're still stuck to a single-core processing on the client-side. For this task, you are limited on IO-wait, and not on client-side processing power, so it should still help you a lot.
- Multiprocessing offers the same as Threading, but also allows you to take advantage of more than one CPU core on the client-side.
Beware that running too many parallel API calls can easily utilize 100% of your F5 appliance CPU. (Test in QA first, and look at performance graphs to find the sweet spot)
DevBabu
Cirrus
Apr 01, 2016Thanks Hannes I will try that one too.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
