Changes between Initial Version and Version 1 of EducationalAssignments/LatencyBandwidthBufferBloat

Changes between Initial Version and Version 1 of EducationalAssignments/LatencyBandwidthBufferBloat

Please note that these Trac pages are no longer being updated. Wiki contents/documentation have moved to GitHub.

Changes between Initial Version and Version 1 of EducationalAssignments/LatencyBandwidthBufferBloat

Please note that these Trac pages are no longer being updated. Wiki contents/documentation have moved to GitHub.

Changes between Initial Version and Version 1 of EducationalAssignments/LatencyBandwidthBufferBloat

Show
Ignore:
Timestamp:
07/30/12 06:56:49 (7 years ago)
Author:
justinc
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • EducationalAssignments/LatencyBandwidthBufferBloat

    v1 v1  
     1= Seattle Latency, Bandwidth, and !BufferBloat Assignment = 
     2 
     3The purpose of this assignment is to illustrate how latency, bandwidth, and bufferbloat impact network traffic.  Students will learn the impact of each feature on video traffic from their computer.   They will take notes on the relative time it takes to interact with the video as well as the amount of video that can pass over the channel in a given amount of time (i.e. the load time per second of video). 
     4 
     5When performing these steps, you are running software on end user machines around the world.   As such it is possible (but unlikely) that you may have a node fail as a user turns off their laptop, loses network connectivity, etc.   If so, you should be able to redo the previous step to continue with the assignment. 
     6 
     7This assignment consists of ?? steps and should take about one hour to complete.   Let's begin! 
     8 
     9'''Windows users:''' You must have Python installed in order to run Seattle. For help installing the right version of Python, refer to our [wiki:InstallPythonOnWindows Python installation instructions]. 
     10 
     11---- 
     12[[TOC(inline)]] 
     13---- 
     14[[BR]] 
     15= Sending video = 
     16[[BR]] 
     17== Step 1 : Setting up the video player == 
     18---- 
     19 
     20 
     21Help!!! 
     22 
     23 
     24[[BR]] 
     25== Step 2 : Communicating through a local relay == 
     26---- 
     27 
     28Download the relay code [wiki:relaycode.zip linked here].   Unpack it and run {{{python simplerelay.py}}} or {{{simplerelay.py}}}.    
     29 If these fail, you may need to [http://www.python.org download python].   On Windows systems, you may also need to set your environment path to point to the copy of python you installed by clicking on Control Panel--> Systems--> Advanced Settings-->Environment Variables.    
     30 
     31Now open your video player server and tell it to ...    (Set up listening / chatting so it goes through the relay.) 
     32 
     33 
     34[[BR]] 
     35== Step 3 : Examining latency == 
     36---- 
     37 
     38Now we will run the relay with additional latency.   This is similar to the behavior you will see when communicating with a computer that is very far away, such as in another country. 
     39 
     40First, we will start with an example of latency you might see over certain connections (especially satellite links for geographically distributed computers).   To do this, run {{{python simplerelay.py 1000}}}    This instructs the relay to delay your traffic by 1000 ms (or 1 second).   Now open the video program and you will observe a 1 second delay between actions and their display on the screen.   
     41 
     42You can also try this with a very extreme example of latency.   To do this, run {{{python simplerelay.py 10000}}}    This instructs the relay to delay your traffic by 10000 ms (or 10 seconds).   Now open the video program and you will observe a 10 second delay between actions and their display on the screen.   
     43 
     44If you stop the server chat program, does the video stop immediately or does it takes a while for the client to notice? 
     45 
     46Does the picture look as clear as the local relay communication? 
     47 
     48 
     49[[BR]] 
     50== Step 4 : Examining bandwidth == 
     51---- 
     52 
     53Now we will run the relay with constraints on the available bandwidth.  This is similar to what you will see communicating over a slow network 
     54 
     55First, we will set the bandwidth to be 100Kbps.   To do this, run {{{python simplerelay.py 0 100}}}    This instructs the relay to set a bandwidth limit of 100Kbps.   Now open the video program and you will observe the video quality is degraded due to the lower bandwidth.   
     56 
     57You can also try this with a very slow connection.   To do this, run {{{python simplerelay.py 0 10}}}    This is a setting of 10Kbps (a similar speed to older dial-up modems).   Now open the video program and you will observe a further degradation of quality.   
     58 
     59If you stop the server chat program, does the video stop immediately or does it takes a while for the client to notice? 
     60 
     61Does the picture look as clear as the local relay communication? 
     62 
     63 
     64[[BR]] 
     65== Step 5 : Examining bufferbloat == 
     66---- 
     67 
     68Now we will run the relay with constraints on the available bandwidth and store content at the relay.  This is similar to what you will see communicating over a slow network that has large buffers in the network hardware.   For an excellent article about bufferbloat, please see XXX. 
     69 
     70First, we will set the bandwidth to be 100Kbps with a buffer of 10MB.   To do this, run {{{python simplerelay.py 0 100 10000}}}   Now open the video program and you will observe the video quality is degraded due to the lower bandwidth.   Let the chat programs run for 20 seconds or so. 
     71 
     72If you stop the server chat program, does the video stop immediately or does it takes a while for the client to notice? 
     73 
     74Does the picture look as clear as the local relay communication? 
     75 
     76 
     77Now try to set the bandwidth and buffering to a different value.   Try to set the bandwidth to 10Mbps with a buffer of 10MB.   To do this, run {{{python simplerelay.py 0 10000 10000}}}   Now open the video program and you will observe the video quality is degraded due to the lower bandwidth.   Let the chat programs run for 20 seconds or so. 
     78 
     79Did this change the video stop time? 
     80 
     81Did this change the picture quality? 
     82 
     83 
     84 
     85[[BR]] 
     86= Communicating through a remote Seattle relay = 
     87[[BR]] 
     88== Step 6 : Adding resources == 
     89---- 
     90 
     91Login to the Seattle [https://seattle.cs.washington.edu/geni/ Clearinghouse website].   If you don't already have an account, go ahead and register for an account.   Click on the My Vessels tab and you'll see that you currently aren't using any resources.  
     92 
     93In the top pane, select WAN and choose 5 vessels, and click "Get".  At this point, you should have vessels (VMs) that you can use to run your code! 
     94 
     95[[BR]] 
     96== Step 7 : Running Seash == 
     97---- 
     98 
     99Now click on the Profile tab, and download the demokit linked from this page.   Unpacking the zip file will create a directory that contains a shell called seash.py and a bunch of other files you need to do the take home assignment.   Click to download your Private Key and Public Key (save the files to the directory with seash.py).  This will give you the credentials necessary to run your programs on the computers now at your disposal.      
     100 
     101 * On Windows do start, run, cmd and then cd to the folder where you downloaded the demokit.    
     102 
     103 * On Mac / Linux, open a terminal window and change to the directory where you downloaded the demokit.    
     104 
     105Then type "python seash.py" or "seash.py".   If these fail, you may need to [http://www.python.org download python].   On Windows systems, you may also need to set your environment path to point to the copy of python you installed by clicking on Control Panel--> Systems--> Advanced Settings-->Environment Variables.    
     106 
     107You will see a prompt like " !> " once seash starts.  Seash will allow you to easily run programs across multiple computers at the same time. 
     108 
     109[[BR]] 
     110== Step 8 : Browsing your resources == 
     111---- 
     112 
     113Now lets add the credentials you just downloaded from the website into seash.  Type the following command at the prompt, '''(replacing ''username'' with the user name you used to log into the Seattle Clearinghouse website)''' 
     114 
     115{{{ 
     116#!python 
     117!> loadkeys username 
     118}}} 
     119 
     120Then, type 
     121 
     122{{{ 
     123#!python 
     124!> as username 
     125}}} 
     126 
     127This will change the prompt to " username@ !> " to indicate that by default, you are now acting with your credentials.  Next, tell seash to search for vessels you control by typing browse: 
     128 
     129{{{ 
     130#!python 
     131username@ !> browse 
     132}}} 
     133 
     134This will search for vessels that you control so that seash can access them.  You should see several vessels added.  The output from browse command will look something like the following: 
     135 
     136{{{ 
     137#!python 
     138username@ !> browse             
     139Added targets: %1(IP:port:vesselname), %2(IP:port:vesselname), %3(IP:port:vesselname), ... 
     140Added group 'browsegood' with X targets       
     141}}} 
     142 
     143This tells you that the seash has discovered (at least some of) the computers you selected and verified that they are ready to run your code.   
     144 
     145If some of the virtual machines were not recognized, feel free to go to the My Vessels tab and remove those VMs.   You can then acquire new ones.   If you browse again, you should see the new computers as recognized.   (Your old ones will still be known to seash too.) 
     146 
     147[[BR]] 
     148== Step 9 : examining characteristics of remote computers == 
     149---- 
     150 
     151 
     152NEEDS TO BE REVISED 
     153 
     154In the above print-out response to the browse command, the %1, %2, %3, etc are an easy way to refer to a computer.  For example, we can run a "hello world" program on computer %1 by typing: 
     155 
     156{{{ 
     157#!python 
     158username@ !> on %1 run helloworld.repy 
     159}}} 
     160 
     161To see the results of this command on computer %1 we would type: 
     162 
     163{{{ 
     164#!python 
     165username@ !> on %1 show log 
     166}}} 
     167 
     168This shows you the output from the %1 computer, which should say "Hello World". If you're going to deal with a specific computer over and over, then constantly typing "on computername" before every command can be very annoying.   You can instead set the default target by simply typing 
     169 
     170{{{ 
     171#!python 
     172username@ !> on %1 
     173}}} 
     174 
     175and hitting enter.  This will change your prompt to be: 
     176 
     177{{{ 
     178#!python 
     179username@%1 !> 
     180}}} 
     181 
     182This indicates that you're acting as your username and you're acting on %1 (unless otherwise specified).  Try typing 
     183 
     184{{{ 
     185#!python 
     186username@%1 !> run helloworld.repy 
     187}}} 
     188 
     189and then type 
     190 
     191 
     192{{{ 
     193#!python 
     194username@%1 !> show log 
     195}}} 
     196 
     197You'll see two "Hello World" lines now because you've run the program twice.   
     198 
     199== Conclusion == 
     200 
     201Needs work!!! 
     202 
     203That's all for the take home assignment.   You've just seen non-transitive connectivity in practice, used one hop detour routing to circumvent it, and also determined if your computer is behind a NAT.   We hope this has been informative and enjoyable.   If you would like to [DonatingResources donate resources] to the Seattle project, you call install Seattle on your home computer.   Clicking on the Get Donations tab from your Seattle Clearinghouse account and picking the appropriate installer to download will credit the donation to your account.   If you have any comments or questions please contact justinc -AT- cs -DOT- washington -DOT- edu