Hi all,

I've been running some rough performance tests on transferring images
using nodelets, and have found the overhead to be higher than I
expected. For reference, I'm running ROS cturtle on Ubuntu 10.04 64 bit
(stock kernel 2.6.32-24-generic) on a 2 GHz Intel Core 2 Duo laptop. CPU
use monitored approximately using htop.

Exchanging one 1920x1280 bgr8 image at 10 fps incurs ~30% CPU use for
the nodelet manager. As expected, this is better than when the nodelets
are run standalone (then ~25% CPU each), but I wanted to check if I'm
doing something wrong that might affect nodelet performance. I've been
using raw Image publishing rather than image_transport, to keep the test
as simple as possible.

The image 'source' is just an uninitialised unsigned char array of the
correct size. As a comparison, I created a node that merely copies the
source array a number of times, and found that 5 memcpy operations
produce about the same CPU load as the best nodelet case, around 30%.
Of course CPU caching may improve the speed of those 5 consecutive
memcpy operations, so I'm not saying "ROS is copying the data 5 times".

I've attached the relevant source files. The question is: Is this the
best we can do at present for image transfer, and if not, are there
modifications on the horizon that will improve performance?

Joel
--
Research Assistant
Ocean Systems Laboratory
Heriot-Watt University, UK



Heriot-Watt University is a Scottish charity registered under charity number SC000278.