-
Notifications
You must be signed in to change notification settings - Fork 63
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
use epoll on linux #9
Comments
I agree that select() is generally the least-performant approach. It is the currently implemented form because it is also the most broadly portable (for both operating systems and python versions). In reference to #3 in your list, Python has the "selectables" in the standard library, but this was only introduced in 3.4. Right now, Thespian supports all versions of Python from 2.6 through 3.5 by taking the "common path" as much as possible. This is definitely a performance issue that should be addressed at some point, so I'm not going to take method 1 (WontFix), and I would prefer to provide internal adaptation and avoid a proliferation of SystemBases (i.e. your method 2 as preference to method 4). If there is too much variation or there is a need for externally-supplied configuration, it may be necessary to introduce a new SystemBase but in general I would prefer to internalize the complexity to keep the Actor usage simple. Keeping this as an open enhancement request to flag this for future performance work. |
By "selectables" do you mean selectors ? If so, the selectors34 package provides a forward-compatible version for python 2.6, 2.7 and 3.3... perhaps that's the correct way forward? (Also, thanks for bringing that to my attention, I hadn't seen it before!) |
another option would be just to use asyncio? |
select.select()
is significantly slower on linux thanselect.epoll()
, so, especially in the case of network services, there's a huge performance gain in usingepoll
.I see a few ways forward:
The text was updated successfully, but these errors were encountered: