-
Notifications
You must be signed in to change notification settings - Fork 62
select.select() consuming excessive process time on Ubuntu & MacOS #234
Description
Hi,
I have been using stackless for some time, but now I am stuck and need to ask for help. In short, the call to select.select() consumes excessive processing time (equal to the wall clock) in some scenarios. It seems it happens when the system get busy, but I have not been able to boil it down better than that.
The behaviour is not consistent across platforms and versions of Stackless. When I started using Stackless back around 2.7.2 I did not have this performance problem. I first got problems on MacOS around 2.7.9 but since I was anyway about to finish up my then big project I just switched to working on Ubuntu. But now I get similar symptoms on Ubuntu as well.
The core loop of my project has not changed significantly since the start. I also don't know what I could have done wrong on Python side to have select.select behave almost like if it was implemented with a loop (but only in some cases).
I would like to move onto Conda because for my new project I need numpy, scipy, and pygame at the same time (as well as FORTRAN compiler) but with the current issues I am kind of stuck.
The behaviour I get is as follows:
Ubuntu 12, 14, 16 - Stackless built locally - Intel 2500K
- Unfortunately the machine died some time ago, and I don't remember the exact Stackless version (probably 2.7.2).
- Running project test suite (multi-threaded): good performance, moderate CPU load
- Running "empty loop" (framework only): low CPU load
- Running "zita" (pygame application + framework): good performance, moderate CPU load that disappeared when idle
Ubuntu 18 - Conda environment - Ryzen 3700
- Python 2.7.16 Stackless 3.1b3 060516 |Anaconda, Inc.| (default, Mar 23 2019, 22:01:13)
[GCC 7.3.0] on linux2 - Running project test suite (multi-threaded): bad performance, high CPU load
- Running "empty loop" (framework only): low CPU load
- Running "zita" (pygame application + framework): decent performance, high % CPU load that persists when idle
Ubuntu 18 - Stackless built locally - Ryzen 3700
- Python 2.7.16 Stackless 3.1b3 060516 (default, Aug 17 2019, 14:48:39)
[GCC 7.4.0] on linux2 - Running project test suite (multi-threaded): bad performance, high CPU load
- Running "empty loop" (framework only): low CPU load
- Running "zita" (pygame application + framework): good performance, moderate CPU load that disappears when idle
MacOS - Conda environment - Intel Core i5 (c:a 2013)
- Python 2.7.15 Stackless 3.1b3 060516 |Anaconda, Inc.| (default, Oct 5 2018, 08:25:48)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin - Running project test suite (multi-threaded): bad performance, high CPU load
- Running "empty loop" (framework only): low CPU load
- Running "zita" (pygame application + framework): poor graphics performance, high CPU load that disappears when idle
MacOS - Downloaded installer - Intel Core i5 (c:a 2013)
- Python 2.7.9 Stackless 3.1b3 060516 (default, Oct 22 2016, 20:25:12)
[GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin - Running project test suite (multi-threaded): bad performance, high CPU load
- Running "empty loop" (framework only): low CPU load
- Running "zita" (pygame application + framework): poor graphics performance, high CPU load that disappears when idle
Sorry for the vague error report, but I just don't have a lot to go on. Any help will be appreciated.
Thank you in advance and best regards,
Andreas