Changes between Version 6 and Version 7 of GENIFIRE/Labwiki/Part0/Execute


Ignore:
Timestamp:
07/07/14 11:18:22 (5 years ago)
Author:
divyashri.bhat@gmail.com
Comment:

--

Legend:

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

    v6 v7  
    7070__Figure 1__. Total number of Bytes
    7171
    72 
    73 b) Connection
     72## Ping Graph
     73
    7474
    7575![](_)
    76 __Figure 2__. Connection-IP Mapping
    77 ## Ping Graph
    78 
    79 
    80 ![](_)
    81 __Figure 3__. Round-trip Time.
     76__Figure 2__. Round-trip Time.
    8277
    8378}}}
     
    9691{{{
    9792
    98 defProperty('source1', "nodea-exttest7", "ID of a resource")
    99 defProperty('source2', "switch1-exttest7", "ID of a resource")
    100 defProperty('source3', "switch2-exttest7", "ID of a resource")
    101 
    102 
    103 defProperty('sinkaddr12', '192.168.1.7', "Ping destination address")
    104 defProperty('sinkaddr13', '192.168.1.8', "Ping destination address")
    105 
    106 defProperty('sinkaddr21', '192.168.1.13', "Ping destination address")
    107 defProperty('sinkaddr23', '192.168.1.14', "Ping destination address")
    108 defProperty('sinkaddr24', '192.168.1.15', "Ping destination address")
     93defProperty('source1', "nodeb-divpart0", "ID of a resource")
     94defProperty('thelistener', "nodea-divpart0", "ID of a resource")
     95defProperty('thesender', "nodeb-divpart0", "ID of a resource")
     96defProperty('thesender2', "nodeb-divpart0", "ID of a resource")
     97defProperty('interfaceServer', "wlan0", 'server interface to modify')
     98defProperty('capacity', 10000000, 'in bits per second')
     99
     100defProperty('sinkaddr11', '192.168.1.7', "Ping destination address")
     101defProperty('sinkaddr12', '192.168.1.6', "Ping destination address")
     102
     103defApplication('iperf') do |app|
     104  app.description = 'Iperf traffic generator and bandwidth measurement tool'
     105  app.binary_path = "/usr/bin/iperf-oml2"
     106
     107  app.defProperty('server', 'run in server mode', '-s',
     108                  :type => :boolean)
     109
     110  app.defProperty('client', 'run in client mode, connecting to <host>', '-c',
     111                  :type => :string,
     112                  :order => 1)
     113
     114  app.defMeasurement("transfer"){ |m|
     115    m.defMetric('pid', :integer, 'Main process identifier')
     116    m.defMetric('connection_id', :integer, 'Connection identifier (socket)')
     117    m.defMetric('begin_interval', :double, 'Start of the averaging interval (Iperf timestamp)')
     118    m.defMetric('end_interval', :double, 'End of the averaging interval (Iperf timestamp)')
     119    m.defMetric('size', :uint64, 'Amount of transmitted data [Bytes]')
     120  }
     121   app.defMeasurement("connection"){ |m|
     122    m.defMetric('pid', :integer, 'Main process identifier')
     123    m.defMetric('connection_id', :integer, 'Connection identifier (socket)')
     124    m.defMetric('local_address', :string, 'Local network address')
     125    m.defMetric('local_port', :integer, 'Local port')
     126    m.defMetric('remote_address', :string, 'Remote network address')
     127    m.defMetric('remote_port', :integer, 'Remote port')
     128  }
     129
     130end
    109131
    110132
     
    129151  end
    130152end
    131 
    132 defApplication('trema') do |app|
    133   app.description = 'This app runs trema from command line'
    134   app.binary_path = '/bin/sh /root/ovs-setup2.sh'
    135 end
    136 defGroup('Source2', property.source2, property.source3) do |node|
    137   node.addApplication("trema")
    138 end
    139153defGroup('Source1', property.source1) do |node|
    140154  node.addApplication("ping") do |app|
    141155    app.setProperty('target', property.sinkaddr12)
    142     app.setProperty('count', 30)
     156    app.setProperty('count', 40)
    143157    #app.setProperty('interval', 1)
    144158    app.measure('ping', :samples => 1)
    145159  end
    146   node.addApplication("ping") do |app|
    147     app.setProperty('target', property.sinkaddr13)
    148     app.setProperty('count', 30)
    149     #app.setProperty('interval', 1)
    150     app.measure('ping', :samples => 1)
    151   end
    152    node.addApplication("ping") do |app|
    153     app.setProperty('target', property.sinkaddr21)
    154     app.setProperty('count', 30)
    155     #app.setProperty('interval', 1)
    156     app.measure('ping', :samples => 1)
    157   end
    158    node.addApplication("ping") do |app|
    159     app.setProperty('target', property.sinkaddr23)
    160     app.setProperty('count', 30)
    161     #app.setProperty('interval', 1)
    162     app.measure('ping', :samples => 1)
    163   end
    164   node.addApplication("ping") do |app|
    165     app.setProperty('target', property.sinkaddr24)
    166     app.setProperty('count', 30)
    167     #app.setProperty('interval', 1)
    168     app.measure('ping', :samples => 1)
    169   end
    170 end
     160end
     161defGroup('theReceiver', property.thelistener) do |node|
     162  node.addApplication("iperf") do |app|
     163    app.setProperty('server', true)
     164    app.measure('transfer', :samples => 1)
     165    app.measure('connection', :samples => 1)
     166  end
     167end
     168
     169defGroup('theSender', property.thesender) do |node|
     170  node.addApplication("iperf") do |app|
     171    app.setProperty('client', property.sinkaddr12)
     172    #app.measure('transfer', :samples => 1)
     173  end
     174end
     175defGroup('theSender2', property.thesender2) do |node|
     176  node.addApplication("iperf") do |app|
     177    app.setProperty('client', property.sinkaddr12)
     178    #app.measure('transfer', :samples => 1)
     179  end
     180end
     181
    171182
    172183
    173184onEvent(:ALL_UP_AND_INSTALLED) do |event|
    174   info "Starting the ping"
    175   after 2 do
    176     group('Source2').startApplications
    177   end
    178   after 20 do
     185  info(" ------ Setup Traffic Shaping")
     186  group("theReceiver").exec("/sbin/modprobe sch_netem")
     187  group("theReceiver").exec("/sbin/modprobe ifb numifbs=10")
     188  group("theReceiver").exec("/sbin/sysctl -w net.core.rmem_max=8388608")
     189  group("theReceiver").exec("/sbin/sysctl -w net.core.wmem_max=8388608")
     190  group("theReceiver").exec("/sbin/sysctl -w net.core.netdev_max_backlog=2048")
     191  #group("theReceiver").exec("/sbin/ifconfig #{prop.interfaceServer} txqueuelen")
     192  group("theReceiver").exec("/sbin/tc qdisc del dev #{prop.interfaceServer} root")
     193  group("theReceiver").exec("/sbin/tc qdisc del dev #{prop.interfaceServer} ingress")
     194  group("theReceiver").exec("/sbin/tc qdisc add dev #{prop.interfaceServer} handle 130 root htb default 1")
     195  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}")
     196  group("theReceiver").exec("/sbin/tc qdisc add dev #{prop.interfaceServer} handle 120 parent 130:1 netem drop 0 delay 0us")
     197  after 2 do
     198    group('theReceiver').startApplications
     199  end
     200  after 5 do
     201    group('theSender').startApplications
     202     info "Starting the ping"
    179203    group('Source1').startApplications
    180204  end
    181   after 80 do
     205  after 15 do
     206    group('theSender2').startApplications
     207  end
     208  after 70 do
    182209    info "Stopping the ping"
     210    group('theSender').stopApplications
     211  end
     212  after 72 do
    183213    allGroups.stopApplications
    184214    Experiment.done
     
    194224  g.yaxis :legend => 'rtt', :ticks => {:format => 's'}
    195225end
     226defGraph 'Iperf' do |g|
     227  g.ms('transfer').select(:oml_seq, :size, :connection_id)
     228  g.caption "Size of received packets."
     229  g.type 'line_chart3'
     230  g.mapping :x_axis => :oml_seq, :y_axis => :size, :group_by => :connection_id
     231  g.xaxis :legend => 'oml_seq [s]'
     232  g.yaxis :legend => 'size [Bytes]', :ticks => {:format => 's'}
     233end
    196234
    197235}}}