INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

NONFRAMEWORK CODE
Driver Interfaces
Drivers
Libraries
Utilities

FRAMEWORK CODE
Interfaces
Components
Libraries
Utilities

Full Software Listings

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

Testing Orca Latencies

Note:
Reviewed for release 2.10.0.

In this tutorial we show how to use two utilities to measure communication latencies. The utilities are Pinger and Replier. The results we produce will be similar to those shown in Performance of Orca Components.

We assume that the IceGrid registry is already running (see earlier tutorials on how to do this). Create a system directory and copy default configuration files.

$ cd ~/sys; mkdir perftest; cd perftest
$ cp [ORCA-INSTALL]/share/orca/cfg/replier.cfg .
$ cp [ORCA-INSTALL]/share/orca/cfg/pinger.cfg .

Start up Replier

We start the replier first.

$ replier

Start up Pinger

Edit the configuration file pinger.cfg : change the number of pings from 101 to 5, so you don't have to wait a long time. You'll end up with something like this:

# Configuration Options
Pinger.Config.Count=5
# Valid values: { "sequence", "iceping" }
Pinger.Config.Driver=sequence
Pinger.Config.Interval=0.250
Pinger.Config.LogFileName=orcapingresults.dat
Pinger.Config.OperationType=2
Pinger.Config.Preload=1
$ pinger

The results are saved in a text file called orcapingresults.dat. Each line corresponds to multiple pings of the same data structure and contains the following:

SIZE RTT_MIN RTT_AVG RTT_MAX RTT_MDEV  RTT0 RTT1 RTT2 ... RTTN

Where SIZE is the size of the data structure in bytes. RTT stands for Round-Trip Time and are stored in milliseconds. RTT_MDEV is standard deviation of the data set (currently not implemented). Note that the contents are similar to the output of UNIX ping.

Latency with IceBox

The latencies are much lower when pinger and replier are run as IceBox services. To take advantage of colocation, the UseSharedCommunicator flag must be set.

IceBox services are not built by default. Their compilation can be enabled with ccmake by setting BUILD_SERVICES = ON. Rebuild and reinstall orca.

$ cd [ORCA-SRC]
$ ccmake .
$ make
# make install

A sample IceBox configuration file for running latency tests is shown below.

#
# Pinter/Replier IceBox configuration.
#

# Components need to know where to find IceStorm
# Separately, we tell IceStorm where to listen (see end of this file)
IceStorm.TopicManager.Proxy=IceStorm/TopicManager:default -t 8000 -p 10000

Ice.Warn.Connections=1
Ice.Trace.Network=0
Ice.Trace.Protocol=0
Ice.PrintAdapterReady=1

Ice.Override.Timeout=200

#
# The IceBox server endpoint configuration (Notice that we assign an unusual port
# here so that we can run it simultaneously with the IceBox which runs IceStorm on
# port 9998. These two IceBoxes could be combined of course, if necessary).
# All services will share one communicator to allow take advantage of collocation
# (see UseSharedCommunicator option for individual services)
#
IceBox.ServiceManager.Endpoints=tcp -p 19998
# Load Replier first!
IceBox.LoadOrder=Replier Pinger

IceBox.Service.Replier=OrcaReplier:create --Ice.Config=replier.cfg
IceBox.UseSharedCommunicator.Replier=1

IceBox.Service.Pinger=OrcaPinger:create --Ice.Config=pinger.cfg
IceBox.UseSharedCommunicator.Pinger=1

Copy it into a file called pingbox.cfg. The ping results will be written into a file specified in pinger.cfg. If you want to compare new results to previous ones, rename the existing log file or change the filename in pinger.cfg. Start the IceBox like so:

$ icebox --Ice.Config=pingbox.cfg

Take a look at the logfile. The round-trip times should be much lower.

What's Next

If everything works, check out more Orca Tutorials.

 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5