Changes between Initial Version and Version 1 of Tutorials/oMF/tut2


Ignore:
Timestamp:
Sep 25, 2014, 6:23:17 PM (10 years ago)
Author:
seskar
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Tutorials/oMF/tut2

    v1 v1  
     1== Exercise 2: Measuring Performance of a MobilityFirst Router ==
     2
     3=== Objective ===
     4
     5In this exercise, we will try to drive synthetic traffic through the router and measure key performance characteristics such as throughput and forwarding latency. Since MobilityFirst presents a hop-by-hop block data transport, we can vary the unit size of the data block and observe it's impact on the performance. We will also try to visualize the performance results using OMF's result service.
     6
     7=== Deploy the Network ===
     8
     9We will assume the network described and initialized in Exercise 1 is up and functional. Instead of the mfping application that was run manually, we will extend the OMF script to add the mfperf application that will drive the performance measurement of the router.
     10
     11The entire script is available as part of the tutorial package as orbit/tutorial/scripts/exercise2.rb
     12
     13The key extensions over previous script are briefly discussed below:
     14
     15==== Setting up the 'mfperf Application' ====
     16
     17The following snippet from the script shows the code added to set up the mfperf application and its arguments:
     18
     19{{{
     20#!ruby
     21defApplication('test:app:mf:mfperf', 'mfperf') do |a|
     22
     23  a.path = "/usr/local/bin/mfperf"
     24  app.appPackage = "http://mobilityfirst.winlab.rutgers.edu/mf-orbit-tutorial.tar"
     25  a.version(0, 9, 1)
     26  a.shortDescription = "MF protocol performance benchmark tool"
     27  a.description = "This is targeted to be similar to the iperf benchmarking tool available for IP protocol. It generates MobilityFirst block packet traffic via the MF socket API and can be used to benchmark performance of MF routers and protocol stack implementations."
     28
     29  # Define the properties that can be configured for this application
     30  #
     31  # syntax: defProperty(name = :mandatory, description = nil, parameter = nil, options = {})
     32  #
     33  a.defProperty('generator', 'Type of packet generator to use (cbr)', '-g', {:type => :string, :dynamic => false})
     34  a.defProperty('dst_GUID', 'GUID of the Destination', '--dst_GUID', {:type => :string, :dynamic => false})
     35  a.defProperty('my_GUID', 'GUID of this Source application', '--my_GUID', {:type => :string, :dynamic => false})
     36  a.defProperty("cbr:size", "Size of data block [bytes]", '--cbr:size', {:dynamic => true, :type => :integer})
     37  a.defProperty("cbr:rate", "Data rate of the flow [kbps]", '--cbr:rate', {:dynamic => true, :type => :integer})
     38
     39  # Define the Measurement Points and associated metrics that are available for this application
     40  #
     41  a.defMeasurement('msg_out') do |m|
     42    m.defMetric('ts',:float)
     43    m.defMetric('msg_no',:long)
     44    m.defMetric('msg_length',:long)
     45    m.defMetric('dst_GUID',:string)
     46  end
     47end
     48}
     49}}}
     50
     51As seen above, the configuration also covers the set up of OML measurement points that we will use to track and visualize the forwarding performance of MFRs.
     52
     53==== Running the Benchmark Application ====
     54
     55The following snippet shows how the exercise runs the mfperf application and also changes the block size dynamically
     56
     57==== Visualizing the Performance Data ====
     58
     59'''Method 1:''' OMF framework supports a result service that allows experimenters to query data stored using the OML measurement framework. The query is performed over the web and requires the you know the hostname and port where the result service runs, and the ''experiment ID'' associated with this experiment - this is obtained from the output following the execution of the control script.
     60
     61The result service supports either dumping of the entire database or a SQL-like querying option to selectively retrieve required measurement data. The below HTTP request shows an example query to retrieve certain fields of our above defined measurement point in the mfperf application:
     62
     63{{{
     64#!sh
     65wget "http://<hostname>:<port>/result/queryDatabase?expID=testing_slice-2010-09-03t09.41.43+10.00&format=csv&query=select ts,msg_no,msg_length from msg_out"  -O msg_out.csv
     66}}}
     67
     68Note that the URL used in wget, in particular the arguments, may require to be encoded to unambiguously represent special characters when using the HTTP protocol.
     69
     70The downloaded data can now be easily visualized using a tool such as gnuplot. You can find a helper script in the tutorial package that plots they key performance data downloaded using the above query.
     71
     72'''Method 2:''' Alternatively, the performance data may also be visualized using ''omf-web'', OMF's web-based visualization service. It also works in concert with the result service referenced in Method 1, and makes available a variety of graph widgets to visualize live-experiment data logged using OML. Detailed documentation on the installation and usage of omf-web can be found on the [https://github.com/mytestbed/omf_web omf-web github site].
     73
     74Since this is installed on all ORBIT domains, we will only concern ourselves with defining the widget configuration required to bring up the live graphs for the performance data we are logging. Below is the contents of the simple two widget configuration file available with this tutorial package:
     75
     76{{{
     77#!yaml
     78title: MobilityFirst Data Transfer Performance
     79
     80# Port number the omf-web service should run at
     81port: 4041
     82
     83# Root url of AM result2 service
     84result2_server: http://oml:5054
     85
     86# Define tabs, widgets for visualisation below
     87#
     88tabs:
     89  # Data transfer throughput
     90  mfperf_tput:
     91    # Line chart widget, need to define columns in mapping section.   
     92    - name: OML TS SERVER
     93      type: line_chart
     94      data: msg_out
     95      mapping:
     96        # x-axis, y-axis and group_by.
     97        x: ts
     98        y: kbytes_per_sec
     99        group_by: oml_sender_id
     100  mfperf_rtt:
     101    # Line chart widget, need to define columns in mapping section.   
     102    - name: OML TS SERVER
     103      type: line_chart
     104      data: msg_out
     105      mapping:
     106        # x-axis, y-axis and group_by.
     107        x: msg_length
     108        y: transfer_time
     109        group_by: oml_sender_id
     110}}}
     111
     112To bring up the visualization, start the basic omf-web service with the configuration file argument:
     113
     114{{{
     115#!sh
     116omf-web-basic -c <config_yaml_file> <experiment id>
     117}}}