Changes between Initial Version and Version 1 of Old/OtherApps/IPerf


Ignore:
Timestamp:
Oct 8, 2005, 6:01:12 PM (19 years ago)
Author:
Surya Satyavolu
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Old/OtherApps/IPerf

    v1 v1  
     1[wiki:WikiStart Orbit] > [wiki:OtherApps Other Applications] > Integrating Iperf with ORBIT
     2
     3{{{
     4#!rst
     5========
     6FAQ
     7========
     8
     9This document covers the general details of integrating sample applications with the ORBIT tesbed setup. A specific example (Iperf) is chosen as a candidate application and the steps are described in the document. The readers are referred to the ORBIT architecture document for the individual software component details.
     10
     11To summarize, nodeHandler is the experiment controller software that is used to choreograph the experiment. It is used to power on, initialize interfaces, launch the applications simultaneously on the nodes involved in the experiment, as well as create databases consistent with the measurements for that particular experiment.
     12
     13OML (ORBIT Measurement Library) is used to collect measurements at run-time from the nodes. It consists of an OML-client on the nodes and the collection server on the experiment controller machine that is used to collect the measurements sent by the clients and insert into appropriate columns of the database.
     14
     15Integrating a new application with this setup mainly consists of the following steps
     16
     17
     18
     19.. contents::
     20.. sectnum::
     21
     22-----
     23
     24
     25
     26
     27Integrating with measurement collection
     28========================================
     29In order to initiate measurement collection using OML, the following steps need to be taken
     30
     31Identifying the measurements reported by Iperf
     32------------------------------------------------
     33
     34The first step is to identify what are the measurements reported by the application and finding the right files in the source code corresponding to these measurement reports. For Iperf, the statistics for UDP are throughput, packet loss and jitter and for TCP: throughput
     35
     36For Iperf, this was traced to the file ReportDefault.c
     37
     38         
     39Create the application definition XML file
     40--------------------------------------------
     41
     42The application definition file for Iperf is defined to capture the outputs that the program reports. This file is later used to auto-generate OML library and headers for this application. The following application definition file has been written for Iperf (using a subset of command line inputs)
     43
     44[wiki:OtherApps/Iperf/IperfAppDefXML Iperf Application Definition Schema]
     45
     46Verify that the XML file is syntactically correct by correct by checking if it opens correctly in an XML enabled browser (IE or Mozilla)
     47
     48Creating OML shared library and headers for Iperf
     49---------------------------------------------------
     50
     51After defining the application definition file as above, use the following command to submit the application definition file to a wrapper utility
     52
     53'''wget -q http://www.orbit-lab.org/oml/client_wrapper --post-file <app-def.xml>'''
     54
     55In response to the <app-def>.xml file, the OML application service returns a tar file containing:  oml_<app-def>.h  and liboml_<app-def>.a.
     56
     57Iperf is then compiled against this library.
     58
     59Include header files and function calls in source code
     60--------------------------------------------------------
     61
     62In the main method of Iperf (found in main.cpp),
     63
     64 ''#include "oml_orbit_winlab_iperf.h"''
     65
     66 ''initialize_oml(&argc, argv, null)''
     67
     68In the file ReportDefault.c
     69 
     70  ''oml_receiverport(msmt1, msmt2, msmt3)''
     71
     72
     73Modify Makefile and build application
     74---------------------------------------
     75
     76Linker options: -loml_client -lomltx
     77   
     78LDFLAGS = -L/usr/lib/ -Lpath_to/liboml_orbit_winlab_iperf.a
     79
     80The oml client package with the required libraries can be obtained from the orbit repository (apt-get oml-client). It will install oml-client and oml_transport libraries in /usr/lib/
     81
     82Note that the OML client is already present on the nodes (so the second step can be ignored)
     83
     84Now, Iperf can be rebuilt using the Makefile.
     85
     86Miscellaneous
     87---------------
     88Note that the application will need the following environment variables to be set
     89
     90'''LD_LIBRARY_PATH = /usr/lib/'''
     91'''OML_NAME=<node-id>'''
     92'''OML_CONFIG=<OML configuration file>'''
     93
     94All these variables are set automatically when the experiment is run using the nodeHandler.
     95
     96
     97
     98Integrating with Nodehandler – Launching the application
     99==========================================================
     100
     101This section includes the details of how to integrate Iperf with the experiment controller (nodeHandler) so that it can be launched on all the nodes involved in the experiment.
     102
     103Create application definitions for Iperf client and server
     104------------------------------------------------------------
     105The following two sample files for Iperf sender and receiver show the details of how to create definitions for any application. The definition mainly contains the command line options that can be set during launching the application as well as the output statistics reported by the application
     106
     107Iperf Sender
     108--------------
     109[wiki:OtherApps/Iperf/IperfSender Iperf Sender Application Script]
     110
     111
     112Iperf Receiver
     113-----------------
     114[wiki:OtherApps/Iperf/IperfReceiver Iperf Receiver Application Script]
     115
     116
     117Create prototypes using previously defined applications
     118----------------------------------------------------------
     119Using the previously defined Iperf client and server application definitions, the next step is to create prototypes that use these applications. For e.g using the basic Iperf application, we define four prototypes, udpsender, udpreceiver, tcpsender and tcpreceiver. Each of these will use Iperf as the underlying application; however their properties can be customized as shown below
     120
     121Iperf UDP Sender
     122------------------
     123[wiki:OtherApps/Iperf/IperfUDPSender Iperf UDP Sender Prototype Script]
     124
     125Iperf UDP Receiver
     126--------------------
     127[wiki:OtherApps/Iperf/IperfUDPReceiver Iperf UDP Receiver Prototype Script]
     128
     129
     130Iperf TCP Sender
     131------------------
     132[wiki:OtherApps/Iperf/IperfTCPSender Iperf TCP Sender Prototype Script]
     133
     134Iperf TCP Receiver
     135--------------------
     136[wiki:OtherApps/Iperf/IperfTCPReceiver Iperf TCP Receiver Prototype Script]
     137
     138Write experiment script using the previously defined application and prototype definitions
     139---------------------------------------------------------------------------------------------
     140The final step is to write the actual experiment script as shown below
     141
     142Experiment Script
     143-------------------
     144[wiki:OtherApps/Iperf/ExperimentScript Experiment Script]
     145
     146Parameters and statistics supported
     147=======================================
     148Sender Side
     149--------------
     150 * UDP or TCP flow
     151 * Sender port number
     152 * TCP Send Window size (for TCP flows)
     153 * Payload length (for UDP flows)
     154 * Bandwidth (offered load for UDP flows)
     155 * Duration of traffic generation
     156 * Number of parallel flows
     157
     158Receiver Side
     159---------------
     160 * UDP or TCP flow
     161 * Receiver port number
     162 * TCP Receive window size (for TCP flows)
     163 * Duration of run
     164 * Payload length (to expect from sender for UDP flows)
     165 * Interval (periodic duration between report generation)
     166
     167Statistics Reported
     168-----------------------
     169 * Throughput (TCP and UDP)
     170 * Jitter (UDP)
     171 * Packet Loss (UDP)
     172 
     173}}}