Changes between Version 4 and Version 5 of GENIEducation/ShufengCheatingSheet


Ignore:
Timestamp:
07/03/13 11:54:13 (11 years ago)
Author:
shuang@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIEducation/ShufengCheatingSheet

    v4 v5  
    11[[PageOutline]]
    22= Hints about using GENI Infrastructure as well as other tools in the GENI system =
     3
     4== GPO Wiki ==
     5 - To find ppl: http://groups.geni.net/syseng/wiki/ContactInfo#CurrentGPOpeople
     6 - New Experiment Tutorial Template: http://groups.geni.net/geni/wiki/GENIEducation/SampleAssignments/Template/ExerciseLayout
     7 -
     8
     9== Traffic Control ==
     10 - tc qdisc
     11{{{
     12tc qdisc add dev eth2 root handle 1:0 netem delay 100ms loss 5%
     13tc qdisc add dev eth2 parent 1:0 tbf rate 20mbit buffer 20000 limit 16000
     14}}}
     15It seems that tc qdisc tbf does not work well (in terms of controlling the throughput of TCP flows) on ovs when ovs switch is connected with a controller. [[BR]]
     16Instead, we use ovs-vsctl:
     17{{{
     18ovs-vsctl set Interface eth2 ingress_policing_rate=1000
     19ovs-vsctl set Interface eth2 ingress_policing_burst=100
     20}}}
     21The above sets the ingress rate to be in 900kbps-1100kbps. [[BR]]
     22To set it back to no rate control, use:
     23{{{
     24ovs-vsctl set Interface eth2 ingress_policing_rate=0
     25}}}
     26
     27It is a little bit tricky to configure delay/loss on an OpenVZ virtual machine [[BR]]
     28Step 1: find our qdisc family number by executing "sudo /sbin/tc qdisc", a sample output could be like the following:
     29{{{
     30[shufeng@center ~]$ sudo /sbin/tc qdisc
     31qdisc htb 270: dev mv6.47 root refcnt 2 r2q 10 default 1 direct_packets_stat 0
     32qdisc netem 260: dev mv6.47 parent 270:1 limit 1000
     33qdisc htb 150: dev mv6.41 root refcnt 2 r2q 10 default 1 direct_packets_stat 0
     34qdisc netem 140: dev mv6.41 parent 150:1 limit 1000
     35qdisc htb 190: dev mv6.43 root refcnt 2 r2q 10 default 1 direct_packets_stat 0
     36qdisc netem 180: dev mv6.43 parent 190:1 limit 1000
     37qdisc htb 230: dev mv6.45 root refcnt 2 r2q 10 default 1 direct_packets_stat 0
     38qdisc netem 220: dev mv6.45 parent 230:1 limit 1000
     39}}}
     40Now if the ethernet card you want to change is mv6.43, you can find from following line:
     41{{{
     42qdisc htb 190: dev mv6.43 root refcnt 2 r2q 10 default 1 direct_packets_stat 0
     43qdisc netem 180: dev mv6.43 parent 190:1 limit 1000
     44}}}
     45As a result, you change the delay/loss by executing the following:
     46{{{
     47sudo /sbin/tc -s qdisc change dev mv6.43 parent 190:1 handle 180: netem limit 1000 delay 100ms loss 5%
     48sudo /sbin/tc -s qdisc change dev mv6.43 parent 190:1 handle 180: netem limit 1000
     49}}}
    350
    451== git Commands ==