Tornado on embedded

38 views
Skip to first unread message

Morgan Tørvolt

unread,
Oct 4, 2015, 3:22:45 PM10/4/15
to Tornado Web Server
Because I know Tornado, and because I like it, I thought I should just try to run it on an embedded system that I am working on. I have everything set up and working fine, except for one thing. It is spending about 15% of the CPU time on my raspberry Pi, and 30% on a different ARM CPU I am testing with. This is when just sitting idle. I am expecting this to be some sort of polling mechanism or similar that is eating CPU time, but I would like to know if there is a way to fix it. I am by no means an expert, so this is why I am coming here. Is there a way for me do reduce the idle CPU load?

Ben Darnell

unread,
Oct 4, 2015, 3:51:21 PM10/4/15
to Tornado Mailing List
On Sun, Oct 4, 2015 at 3:22 PM, Morgan Tørvolt <mor...@torvolt.com> wrote:
Because I know Tornado, and because I like it, I thought I should just try to run it on an embedded system that I am working on. I have everything set up and working fine, except for one thing. It is spending about 15% of the CPU time on my raspberry Pi, and 30% on a different ARM CPU I am testing with. This is when just sitting idle. I am expecting this to be some sort of polling mechanism or similar that is eating CPU time, but I would like to know if there is a way to fix it. I am by no means an expert, so this is why I am coming here. Is there a way for me do reduce the idle CPU load?

What exactly is your program doing? The idle CPU usage should be nearly zero if you don't have any PeriodicCallbacks (or equivalent). There are only two places in Tornado itself that create PeriodicCallbacks: curl_httpclient and autoreload (aka debug mode). If you are using either of those features, turn them off and you should see idle usage drop.

-Ben
 

--
You received this message because you are subscribed to the Google Groups "Tornado Web Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-tornad...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Phyo Arkar

unread,
Oct 6, 2015, 7:40:15 AM10/6/15
to Tornado Mailing List

Also try it on pypy arm. It is very much faster if you on 2.6.1

Morgan Tørvolt

unread,
Oct 6, 2015, 4:52:10 PM10/6/15
to Tornado Mailing List
Disabling debug worked. I have no recollection of it being enabled. Thank you very much!

-Morgan-

--
You received this message because you are subscribed to a topic in the Google Groups "Tornado Web Server" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python-tornado/SVsMgrlUQsQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python-tornad...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages