New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ipython-qtconsole uses 100% CPU #588
Comments
Now that I read your bug report, I recall this happened to me the other day. Saw a Similar setup: Windows 7 64 bit |
Says @epatters on-list: It would be helpful to know whether the CPU utilization is pylab-specific. I suspect the trouble may be there. |
Unless the |
For reference, can you see if the same thing happens when you start the qtconsole in the normal No, the qtconsole does not do any pylab imports by default, but it could be related to the polling, which is different for with and without pylab integration. Does it happen if you do use |
Yes. Still get 100% usage on one core. The only difference is that
Good thinking! |
Great, thanks! That probably means it's the zeromq poller that's not properly idle. Possibly a units issue on Windows. What if you do:
? |
With my installation, there is negligible CPU usage with ipython.exe and ipython.exe --pylab. Usage of 100% of a core with the following command lines So it appears that not pylab specific with my installation. Let me know if there is anyway I can get you more information about what the process is executing. |
@epatters it's actually the WindowsParentPoller. On 64b Windows, there is a line that specifies |
WindowsParentPoller makes a winapi call, and needs to handle 32/64b pointer difference. This commit adds switching of c_int vs c_int64, depending on platform.architecture(). It also prevents hogging CPU by adding a short sleep in possible cases where the call still fails. closes ipythongh-588
Try the code from here: #589 It fixes the problem on my 64b VM, and if there are other combinations of platform or version that still cause a similar error, it won't throttle the CPU anyway (instead, the parent poller will just not work). |
Sorry for the accidental close, I am new to github. Nice, that fixed it all the cases I described above. Thanks! |
Great! Nice catch @minrk. |
On Sun, Jul 17, 2011 at 7:23 PM, epatters
@minrk, awesome job, as usual. Thanks for jumping on this! f |
WindowsParentPoller makes a winapi call, and needs to handle 32/64b pointer difference. This commit adds switching of c_int vs c_int64, depending on platform.architecture(). It also prevents hogging CPU by adding a short sleep in possible cases where the call still fails. closes ipythongh-588
closes ipythongh-589 closes ipythongh-588
I recently ran into this issue when following a video on installing anaconda etc. Can anyone provide instructions on how to implement the code that minrk wrote to fix the problem. I just started trying to use python and am definitely a novice (I spend most of my time doing stats coding and not configuring programs) so I'm a bit out of my depth with fixing this. Any help would be greatly appreciated! Thanks in advance. |
Hi,
When I run ipython-qtconsole.exe, I observe 100% CPU usage (really 50% on my dual core machine) when nothing is running in the console. My machine consists of the following configuration:
Windows 7 64 bit
Python 2.7.2 64 bit binary install (from python.org)
PyQT and QT from Christoph Gohlke 's binary distribution PyQt-Py2.7-x64-gpl-4.8.4-1.exe
I first observed this behavior on Christoph Gohlke 's ipython-0.11.dev.win-amd64-py2.7.exe. I then uninstalled that package and pull the latest IPython from github. The latest version still exhibits the 100% CPU usage behavior on my machine.
Some other observations that might be helpful:
The text was updated successfully, but these errors were encountered: