[ python-Bugs-1010098 ] CPU usage shoots up with asyncore
SourceForge.net
noreply at sourceforge.net
Thu Aug 19 19:29:41 CEST 2004
Bugs item #1010098, was opened at 2004-08-16 10:54
Message generated for change (Comment added) made by rhettinger
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1010098&group_id=5470
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
>Priority: 6
Submitted By: Thomas (thomasabc)
>Assigned to: A.M. Kuchling (akuchling)
Summary: CPU usage shoots up with asyncore
Initial Comment:
The CPU usage of a python application program using
asyncore.py shoot up to 99% under Python 2.4a1. After
a comparison, it was found out that the same program
ran without such high CPU usage under Python 2.3.3
A simple couple of programs to narrow down the problem
showed that a single loop() was accompanied by a large
number of poll() with 2.4a1, whereas a single loop() had
only 3 calls to poll() with 2.3.3.
Please let me know if there is anything else I can do for
you to analyse. A couple of python scripts are attached
in a zip file for you as below:
- Summary of the test scripts
With these scripts, the test attempts to identify what
function calls are called that might explain the high CPU
usage observed.
asyncore_test.py:
Taken from the Python Library Reference 11.24.2
asynchat Example, the test program starts a server
process to simulate client request process.
http_test.py:
This program simply establishes connection to the server
and closes after 10 seconds.
- Procedure
1. Start asyncore_test.py
2. Start http_test.py
3. Stop asyncore_test.py
----------------------------------------------------------------------
>Comment By: Raymond Hettinger (rhettinger)
Date: 2004-08-19 12:29
Message:
Logged In: YES
user_id=80475
Andrew, what this due to your updates or was Martin's loop
counter the cause?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1010098&group_id=5470
More information about the Python-bugs-list
mailing list