Changes between Initial Version and Version 1 of GENIExperimenter/Tutorials/SIGCSE13Tutorial/RunExampleAssignment


Ignore:
Timestamp:
03/04/13 19:01:25 (7 years ago)
Author:
nriga@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIExperimenter/Tutorials/SIGCSE13Tutorial/RunExampleAssignment

    v1 v1  
     1
     2[[PageOutline]]
     3= 1. Create an experiment =
     4Now that your project is all setup, you are ready to run your first GENI experiment. For the purpose of this tutorial we are going to use a sample assignment that compares a UDP based transfer protocol with a TCP one. 
     5
     6{{{
     7#!html
     8<table border="0">
     9   
     10      <tr>
     11        <td>
     12
     13        <img border="0" src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Graphics/add-resources-portal.png?format=raw" alt="Create a GENI Project"  height="120" title="Create a GENI Project" /> </a>
     14       </td>
     15       <td >
     16         <ol>
     17            <li> Go to the <i>Home</i> tab. </li>
     18           <li> In the project that <b>you</b> created press the <b>Create Slice</b> button</li>
     19            <li> <FONT COLOR="black">As a slice name use <code>udt</code>, you can leave the description empty and press <b>Create Slice</b></font>
     20            </li>
     21            <li> Select <b>Add Resources</b></li>
     22            <li>Since this if the first time you are trying to reserve resources, you should see a warning on the top about not having an SSH key in your account. Access to compute resources in GENI is provide through ssh key pairs and thus the portal needs a public key to upload to compute resources. For the purposes of the tutorial we will have the portal creating an SSH key pair for you. However, if you prefer to use your personal public key you can choose to upload it. Click on the <b>Generate and Download SSH Keypair</b> button.</li>
     23           
     24            <li>Press the <b>Download Private Key</b> button</li>
     25            <li> Open a terminal and execute <code>ssh-add ~/Downloads/id_geni_ssh_rsa</code> </li>
     26            <li> <FONT COLOR="black">Go to the <i>Slices</i> tab and press again on the <b>Add Resources</b> button. This time there should be no warning. Complete the form as as shown in the picture on the left and press the <b>Reserve Resources</b> button </font></li>
     27<li> While we wait for our resources to get ready, lets look at another tool that is integrated with the portal. <FONT COLOR="black">Go to the <i>Slices</i> tab and press the <b>Launch Flack</b> button.</li>
     28
     29          </ol>
     30       </td>
     31       
     32    </tr>
     33 </table>
     34}}}
     35
     36= 2. Run your experiment =
     37Once your resources are ready, your slice in Flack will be green. We can now continue to the interesting part of running through the sample assignment. In this sample assignment the students will experiment with a UDP-based (UDT) and a TCP-based(FTP) file transfer protocols. For the purpose of this tutorial we have made the assignment much simpler, but you can see the complete assignment [wiki:UDTExampleExperiment here].
     38
     39In order to be able to complete this assignment we need to:
     40  *  [#a2a.LogintoNodes login to  our nodes]
     41  *  learn how to have a [#a2b.UDTvsFTPExperiment complete run comparing UDT and FTP]
     42  * learn to to [#a2c.ModifyLinkParameters view and modify] the parameters of the link between the server and the client hosts
     43=== 2a. Login to Nodes ===
     44{{{
     45#!html
     46<table border="0">
     47   
     48      <tr>
     49        <td align="center">
     50
     51        <img border="0" src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Graphics/flack-host.png?format=raw" alt="Flack Host"  width="100" title="Create a GENI Project" />
     52<br/><br/>
     53        <img border="0" src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Graphics/flack-ssh.png?format=raw" alt="Flack host ssh"  width="250" title="Create a GENI Project" />
     54       </td>
     55       <td >
     56         <ol>
     57            <li> While your slice is loaded in Flack, <b> press the blue (i) button</b> on a host. This will load the information about the host. </li>
     58           <li> On the top of the new tab that showed up, <b> press the ssh button </b>. This will cause the ssh client to launch. If you have setup the the key correctly, you should get logged in to your host. </li>
     59            <li> Repeat this process for all hosts; <b><code> server, clienth, delay </code></b>
     60            </li>           
     61
     62          </ol>
     63       </td>
     64       
     65    </tr>
     66 </table>
     67}}}
     68
     69You should now have three terminals open, one for each host.
     70
     71=== 2b. UDT vs FTP Experiment ===
     72
     73For the purpose of this tutorial, we have automated a single run of the experiment that compare UDT and FTP over a single file transfer between the client and the server. In the server we have placed 4 files of different sizes: sm.1M, med.10M, lg.100M, xl.1000M. In the terminal window of the `clienth` host run:
     74{{{
     75[inki@clienth ~]$ /local/scripts/get_both_file.sh sm.1M
     76FTP: 1M in 255 ms
     77UDT: 1M in 552 ms
     78}}}
     79
     80Try the same for the other files, you can skip the xl.1000M, since it will take a bit to complete.
     81
     82
     83=== 2c. Modify Link Parameters ===
     84
     85In this experiment, you'll be changing the characteristics of the link and measuring how they affect UDT and TCP performance.
     86
     87 * In the terminal of the delay node run this command:
     88{{{
     89%sudo ipfw pipe show
     90}}}
     91
     92You'll get something like this:
     93{{{
     9460111: 100.000 Mbit/s    1 ms   50 sl. 1 queues (1 buckets) droptail
     95    mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000
     96BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp
     97  0 ip    207.167.175.72/0       195.123.216.8/6        7     1060  0    0   0
     9860121: 100.000 Mbit/s    1 ms   50 sl. 1 queues (1 buckets) droptail
     99    mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000
     100BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp
     101  0 ip   207.167.176.224/0         195.124.8.8/6        8     1138  0    0   0
     102}}}
     103
     104This information shows the internal configuration of the "pipes" used to emulate network characteristics.
     105(Your output may look different, depending on the version of ipfw installed on your delay node.
     106In any case, the information you need is on the first line of output for each pipe.)
     107
     108You'll want to make note of the two pipe numbers, one for each direction of traffic along your link.
     109In the example above, they are 60111 and 60121.
     110
     111There are three link characteristics we'll manipulate in this experiment: bandwidth, delay, and packet loss rate.
     112You'll find their values listed in the ipfw output above.
     113The link bandwidth appears on the first line immediately after the pipe number. It's 100Mbps in the example shown above.
     114The next value shown is the delay, 1 ms in the example above.
     115The packet loss rate (PLR) is omitted if it's zero, as shown above. If non-zero, you'll see something like '''plr 0.000100'''
     116immediately after the "50 sl." on the first output line.
     117
     118It is possible to adjust the parameters of the two directions of your link separately, to emulate asymmetric links.
     119In this experiment, however, we are looking at symmetric links, so we'll always change the settings on both pipes together.
     120
     121Here are the command sequences you'll need to change your link parameters.
     122In each case, you'll need to provide the correct pipe numbers, if they're different from the example.
     123
     124 * To change bandwidth (10M means 10Mbits/s):
     125{{{
     126sudo ipfw pipe 60111 config bw 10M
     127sudo ipfw pipe 60121 config bw 10M
     128}}}
     129
     130 * Request a bandwidth of zero to use the full capacity of the link (unlimited):
     131{{{
     132sudo ipfw pipe 60111 config bw 0
     133sudo ipfw pipe 60121 config bw 0
     134}}}
     135
     136 * To change link delay (delays are measured in ms):
     137{{{
     138sudo ipfw pipe 60111 config delay 10
     139sudo ipfw pipe 60121 config delay 10
     140}}}
     141
     142 * To change packet loss rate (rate is a probability, so 0.001 means 0.1% packet loss):
     143{{{
     144sudo ipfw pipe 60111 config plr .0001
     145sudo ipfw pipe 60121 config plr .0001
     146}}}
     147
     148 * You can combine settings for bandwidth, delay, and loss by specifying more than one in a single ipfw command. We'll use this form in the procedure below.
     149
     150== Experiment Procedure ==
     151
     152 * Set your link parameters to use maximum bandwidth, no delay, no packet loss:
     153
     154{{{
     155sudo ipfw pipe 60111 config bw 0 delay 0 plr 0
     156sudo ipfw pipe 60121 config bw 0 delay 0 plr 0
     157}}}
     158
     159 * Verify with
     160
     161{{{
     162sudo ipfw pipe show
     16360111: unlimited    0 ms   50 sl. 1 queues (1 buckets) droptail
     164    mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000
     165BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp
     166  0 ip    207.167.175.72/0       195.123.216.8/6        7     1060  0    0   0
     16760121: unlimited    0 ms   50 sl. 1 queues (1 buckets) droptail
     168    mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000
     169BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp
     170  0 ip   207.167.176.224/0         195.124.8.8/6        8     1138  0    0   0
     171}}}
     172
     173Note that bandwidth is set to ''unlimited'', delay to ''0 ms'', and no PLR is shown.
     174
     175 * Using this initial setting, try to transfer the files and note the rate of UDT and FTP.
     176
     177 * Now change the link parameters to reduce the available bandwidth to 10Mbps:
     178
     179{{{
     180sudo ipfw pipe 60111 config bw 10M delay 0 plr 0
     181sudo ipfw pipe 60121 config bw 10M delay 0 plr 0
     182}}}
     183
     184 * Repeat your file transfers with the new settings. As before, note the transfer sizes and rates, as well as the link settings.
     185
     186 * Continue with additional trials, varying each of the three link parameters over a range sufficient to observe meaningful performance differences. Record your data.
     187
     188
     189= 3. Delete your experiment =
     190When we are done with our experiment it is always good to clean up and release our resources so other people can use them.
     191{{{
     192#!html
     193<table border="0">
     194   
     195      <tr>
     196        <td>
     197
     198        <img border="0" src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Graphics/delete-resources-portal.png?format=raw" alt="Create a GENI Project"  height="90" title="Create a GENI Project" /> </a>
     199       </td>
     200       <td >
     201         <ol>
     202            <li> Go to the <i>Slices</i> tab. </li>
     203           <li> In your slice press the <b>Release Resources</b> button</li>
     204
     205          </ol>
     206       </td>
     207       
     208    </tr>
     209 </table>
     210}}}
     211
     212
     213Congratulations you have successfully completed your first GENI assignment!
     214
     215= [wiki:NikySandbox/SIGSCETutorial/SetupAccount Previous Part: Setup your GENI account and your GENI Project] =