Closed GoogleCodeExporter closed 8 years ago
Victor,
Thanks so much for the bug-fix and for cross-posting this to ROS answers. I've
just incorporated this fix into our SVN version ( svn co
https://brown-ros-pkg.googlecode.com/svn/trunk/experimental/rosbridge rosbridge
) and it will be available in the Electric and Diamondback binaries as soon as
Willow refreshes their distribution (the packages will be labeled 0.0.19).
What your fix basically does is make the loop sensitive to the HZ parameter.
Since the default HZ in your version is so low (200Hz) CPU usage drops
dramatically. However, at the moment most of our users are expecting
performance to favor throughput. I've thus changed the default HZ to 100000
(equivalent to 100 kHz) coincident with applying your fix. This will mean that
if you want to cut down on CPU usage, you'll need to specify your own HZ as the
default will do quite a bit of spinning.
One other thing I should mention is that the 100% usage is a bit misleading and
you should always try to run rosbridge alongside your planned load. While
select operations will dominate a CPU on an "empty" processor according to top,
they are still blocking (as called in rosbridge) and present yield
opportunities. The end result is that while rosbridge will take 100% of a CPU
with no other load, it will not in general effect the performance of other
applications very much (if at all). For example, when you run Gazebo (a
CPU-bound process) on the same core, rosbridge will only take up ~1% of the
proc according to top.
Thanks again for the patch!
_Trevor
Original comment by trevor...@gmail.com
on 3 Feb 2012 at 8:10
Original issue reported on code.google.com by
lopez1...@gmail.com
on 2 Feb 2012 at 1:38Attachments: