[ros-users] ROS cpu load
cedric.pradalier at mavt.ethz.ch
Sat Jul 31 22:30:19 UTC 2010
On 08/01/10 00:13, Ken Conley wrote:
> Thanks for the great analysis.
cProfile is actually a pretty good tools to analyse this kind of thing,
and trivial to run on the python scripts:
I also used oprofile for the C++ nodes, but this was not so practical
with mostly-sleeping processes (so I add to let it run for a long time).
> I've updated pmon.py (r10575), as I agree that that loop can run
> slower. What was the CPU usage before that?
Around 5%. This is not much, but I considered it was too much given that
the system was sitting idle, with just roscore started.
> You previously mentioned getting some numbers on rospy -- I'd love to
> know if you see any issues there or not, even if you don't have time
> to track down more fast loops. AFAIK, the main problem with rospy is
> that Python gobbles up memory when you use threads, and rospy is a bit
> too greedy in this regard. The hope is to redo the threading model in
> a future rewrite, but it's good to understand the current issues when
I looked a bit for rospy, and could not identify exactly where we're
losing time. I have one process where I'm publishing 40 bytes messages
at 30 fps, and the cpu load significantly increase as soon as we send to
a remote host, from 1-2% if listening locally, to 7-10% when listening
remotely. I need to investigate further and I'll let you know.
Dr. Cedric Pradalier
More information about the ros-users