Changes between Version 3 and Version 4 of GENIFIRE/Labwiki/Part0/DesignSetup


Ignore:
Timestamp:
07/07/14 05:01:17 (5 years ago)
Author:
divyashri.bhat@gmail.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIFIRE/Labwiki/Part0/DesignSetup

    v3 v4  
    1515=== 2.1 Define Property ===
    1616
     17defProperty('source1', "client-lwtest6", "ID of a resource")
     18defProperty('thelistener', "server-lwtest6", "ID of a resource")
     19defProperty('thesender', "client-lwtest6", "ID of a resource")
     20defProperty('thesender2', "client-lwtest6", "ID of a resource")
     21defProperty('interfaceServer', "eth3", 'server interface to modify')
     22defProperty('capacity', 10000000, 'in bits per second')
     23
     24defProperty('sinkaddr11', '10.0.5.102', "Ping destination address")
     25defProperty('sinkaddr12', '10.0.5.101', "Ping destination address")
     26
    1727
    1828=== 2.2 Define Application ===
    1929
    20 
    21 === 2.3 Define Group ===
     30The entire application definition for OML-Iperf is given [http://mytestbed.net/projects/omlapp/repository/iperf/entry/oml/iperf.rb.in?rev=oml%2Fmaster here]
     31
     32Select the definition you will use in your experiment. The Application definition includes the properties and measurement parameters
     33
     34
     35{{{
     36defApplication('iperf') do |app|
     37  app.description = 'Iperf traffic generator and bandwidth measurement tool'
     38  app.binary_path = "/usr/bin/iperf-oml2"
     39
     40  app.defProperty('server', 'run in server mode', '-s',
     41                  :type => :boolean)
     42
     43  app.defProperty('client', 'run in client mode, connecting to <host>', '-c',
     44                  :type => :string,
     45                  :order => 1)
     46
     47  app.defMeasurement("transfer"){ |m|
     48    m.defMetric('pid', :integer, 'Main process identifier')
     49    m.defMetric('connection_id', :integer, 'Connection identifier (socket)')
     50    m.defMetric('begin_interval', :double, 'Start of the averaging interval (Iperf timestamp)')
     51    m.defMetric('end_interval', :double, 'End of the averaging interval (Iperf timestamp)')
     52    m.defMetric('size', :uint64, 'Amount of transmitted data [Bytes]')
     53  }
     54   app.defMeasurement("connection"){ |m|
     55    m.defMetric('pid', :integer, 'Main process identifier')
     56    m.defMetric('connection_id', :integer, 'Connection identifier (socket)')
     57    m.defMetric('local_address', :string, 'Local network address')
     58    m.defMetric('local_port', :integer, 'Local port')
     59    m.defMetric('remote_address', :string, 'Remote network address')
     60    m.defMetric('remote_port', :integer, 'Remote port')
     61  }
     62
     63end
     64}}}
     65
     66We follow the same for the ping application
     67=== 2.3 Define Group and add Applications===
    2268
    2369a) Server Group [[BR]]
    2470
    2571
     72{{{
     73defGroup('theReceiver', property.thelistener) do |node|
     74  node.addApplication("iperf") do |app|
     75    app.setProperty('server', true)
     76    app.measure('transfer', :samples => 1)
     77    app.measure('connection', :samples => 1)
     78  end
     79end
     80}}}
     81
     82
    2683b) Client Group [[BR]]
    2784
    2885
    29 
    30 === 2.3 Adding Applications ===
    31 
    32 
    33 === 2.4 Define Experiment Event ===
    34 
    35 
    36 === 2.5 Complete OEDL script ===
     86{{{
     87defGroup('theSender', property.thesender) do |node|
     88  node.addApplication("iperf") do |app|
     89    app.setProperty('client', property.sinkaddr12)
     90    #app.measure('transfer', :samples => 1)
     91  end
     92end
     93}}}
     94
     95c) Ping Group
     96
     97{{{
     98defGroup('Source1', property.source1) do |node|
     99  node.addApplication("ping") do |app|
     100    app.setProperty('target', property.sinkaddr12)
     101    app.setProperty('count', 40)
     102    #app.setProperty('interval', 1)
     103    app.measure('ping', :samples => 1)
     104  end
     105end
     106}}}
     107=== 2.3 Define Experiment Event ===
     108
     109==== 2.3.1 Traffic Control ====
     110
     111
     112{{{
     113group("theReceiver").exec("/sbin/modprobe sch_netem")
     114  group("theReceiver").exec("/sbin/modprobe ifb numifbs=10")
     115  group("theReceiver").exec("/sbin/sysctl -w net.core.rmem_max=8388608")
     116  group("theReceiver").exec("/sbin/sysctl -w net.core.wmem_max=8388608")
     117  group("theReceiver").exec("/sbin/sysctl -w net.core.netdev_max_backlog=2048")
     118  #group("theReceiver").exec("/sbin/ifconfig #{prop.interfaceServer} txqueuelen")
     119  group("theReceiver").exec("/sbin/tc qdisc del dev #{prop.interfaceServer} root")
     120  group("theReceiver").exec("/sbin/tc qdisc del dev #{prop.interfaceServer} ingress")
     121  group("theReceiver").exec("/sbin/tc qdisc add dev #{prop.interfaceServer} handle 130 root htb default 1")
     122  group("theReceiver").exec("/sbin/tc class add dev #{prop.interfaceServer} classid 130:1 parent 130 htb rate #{prop.capacity.to_s} ceil #{prop.capacity.to_s}")
     123  group("theReceiver").exec("/sbin/tc qdisc add dev #{prop.interfaceServer} handle 120 parent 130:1 netem drop 0 delay 0us")
     124}}}
     125
     126
     127==== 2.3.2 Define Events ====
     128
     129
     130{{{
     131after 2 do
     132    group('theReceiver').startApplications
     133  end
     134  after 5 do
     135    group('theSender').startApplications
     136     info "Starting the ping"
     137    group('Source1').startApplications
     138  end
     139  after 15 do
     140    group('theSender2').startApplications
     141  end
     142  after 70 do
     143    info "Stopping the ping"
     144    group('theSender').stopApplications
     145  end
     146  after 72 do
     147    allGroups.stopApplications
     148    Experiment.done
     149  end
     150}}}
     151
     152
     153=== 2.4 Complete OEDL script ===
    37154
    38155{{{