-
Notifications
You must be signed in to change notification settings - Fork 89
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
High CPU with event I/O #11
Comments
Thanks for letting me know; I added a bit of delay into the event loop, and it should be down to around 50% CPU usage now. That's about as good as I can get it without really slowing it down. I plan to eventually interface a real event-driven framework like Twisted, but for now EventIO does an OK job. |
Thank you very much for your great works. |
I have been using PyBBIO in Tornado's IOLoop and things are working well so far. |
Bduhan, the I/O event is working but it cause the CPU usage very high. You have to check CPU usages with top command. |
Thank you cbr1k, I was mainly suggesting that alexanderhiam look into using Tornado or 'select.epoll' as an alternative to the polling loop in EventIO here. Both of these methods support adding/removing monitored FDs while the loop is running and Tornado has some nicer (low overhead) mechanisms for scheduling work in the future or after another action has completed. As an anecdote, I have four devices that clock data into to my BeagleBone using edge triggered interrupt inputs (configured through sysfs) which are added and removed from Tornado's IOLoop on demand/schedule. When all four are enabled and a browser client is watching the data (highcharts, websockets) the CPU load for this process stays around 10-20%. |
Thanks bduhan, Tornado definitely sounds like a good option, I'll take a look at it. |
When activated event I/O (DigitalTrigger), it cause CPU usage to jump to >90%.
The text was updated successfully, but these errors were encountered: