I’m having issues with proton consuming a lot of CPU, at or close to 100% of a 
core. This is with an exchange which is mostly silent (1 health message, around 
200-300 bytes, sent every 30 seconds), and happening with 
python-qpid-proton==0.14.0 on both OS X 10.12 and Centos 7.

99.3% CPU usage on OS X (brew Python 3.5):
27322 ryan.pess  24   0 2411M 31724 ? 99.3  0.2  1:23.96 
/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/Resources/Python.app/Contents/MacOS/Python
 /Users/ryan.pessa/Library/A

99.7% CPU usage on Centos (system Python 3.4):
   27 root      20   0  240500  24380   5852 S  99.7  0.6   0:49.91 python3.4

The application is a simple Container with a MessagingHandler: 
Container(Receiver(…)).run()

For debugging purposes, I commented out all of the handlers on Receiver (our 
MessagingHandler subclass), but that had no effect. Still ~100% CPU usage. The 
CPU usage is high as soon as the application starts, even before receiving any 
messages. The same does not happen with qpid-python.

I’ve attached a kgrind file from a profiling run (converted from pstat created 
by cProfile). I let the application run for 2 minutes, during which time a 
total of three messages came across the INCOMING exchange that the application 
listens to. 99.34% of the CPU time was spent in the pn_handler_dispatch 
function.

Is there something I can do differently to fix this problem in my application? 
Or is this an issue in the proton-c library, or the Python bindings?

Thanks!
Ryan M. Pessa

This message and its attachments are the property of iJet Technologies, Inc. 
and are intended solely for the use of the designated recipient(s) and their 
appointed delegates. This email may contain information that is confidential. 
If you are not the intended recipient, you are prohibited from printing, 
copying, forwarding or saving any portion of the message or attachments. Please 
delete the message and attachments and notify the sender immediately. Thank you 
for your cooperation.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to