wiki:MEBSandbox/UDTExample

Version 15 (modified by Mark Berman, 12 years ago) (diff)

--

Sample Experiment: UDT Evaluation

Purpose

In this experiment, you will compare the performance of UDT (UDP-based Data Transfer) to TCP (transmission control protocol) in a simple network under varying conditions.

This experiment is based on work carried out at the University of Missouri - Kansas City, by Sunae Shin, Kaustubh Dhondge, and Baek-Young Choi. Their paper "Understanding the Performance of TCP and UDP-based Data Transfer Protocols using EMULAB" was presented at the First GENI Research and Educational Experiment Workshop (GREE2012), March 15-16, 2012, Los Angeles, CA.

Prerequisites

Before beginning this experiment, you should be prepared with the following.

  • You have GENI credentials to obtain GENI resources. (If not, see link).
  • You are able to use Flack to request GENI resources. (If not, see link).
  • You are able to log in to GENI compute nodes using ssh and execute basic commands using a UNIX shell. (If not, see link).

Setup

  1. Download the attached [link:attachment:udt.rspec rspec file] and save it on your machine.
  2. Start Flack, create a new slice, load rspec udt.rspec and submit for sliver creation. (Include a picture here.)
  3. Log into pc1 and pc2 in separate windows.
  4. On pc1, start a UDT file transfer server, using this command:
    % pc1:~% /local/udt4/app/sendfile
    server is ready at port: 9000
    

On pc2, start a UDT file transfer client, using this command:

pc2:~% /local/udt4/app/recvfile pc1 9000 /local/datafiles/sm.10M /dev/null

You should see output like the following in your pc1 window, showing the results of the file transfer. Note the transfer rate.

new connection: 192.168.2.2:55839
speed = 7.14472Mbits/sec
  1. There are three data files available for transfer tests: /local/datafiles/sm.10M is 10MB, /local/datafiles/med.100M is 100MB, and /local/datafiles/lg.1G is 1GB. Leave your transfer server running on pc1, and try transferring each of these files in turn by typing the appropriate commands on pc2. Keep track of the transfer rates in each case.
  2. Now let's compare the results to a TCP-based (FTP) transfer. On pc2, start an ftp client:


(You type ftp pc1, the user name anonymous, and any password you want, although your e-mail address is traditional.)

pc2:~% ftp pc1
Connected to PC1-lan1.
220 (vsFTPd 2.3.2)
Name (pc1:mberman): anonymous
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> 

Still on pc2, request a file transfer. Note the reported file size, transfer time, and transfer rate.

ftp> get med.100M
local: med.100M remote: med.100M
200 PORT command successful. Consider using PASV.
150 Opening BINARY mode data connection for med.100M (104857600 bytes).
226 Transfer complete.
104857600 bytes received in 1.75 secs (58508.9 kB/s)

Adjusting link characteristics

Now try changing the characteristics of the link and measuring how they affect UDT and TCP performance. You will need to log into your delay node to change the link characteristics. Then, on your delay node, use this command:

%sudo ipfw pipe show

You'll get something like this:

60111: 100.000 Mbit/s    1 ms   50 sl. 0 queues (1 buckets) droptail
60121: 100.000 Mbit/s    1 ms   50 sl. 1 queues (1 buckets) droptail

        mask: proto: 0x00, flow_id: 0x00000000,  ::/0x0000 -> ::/0x0000
BKT ___Prot___ _flow-id_ ______________Source IPv6/port_______________ _______________Dest. IPv6/port_______________ Tot_pkt/bytes Pkt/Byte Drp
  0 ipv6-icmp 1610612736                                       ::/0                            ff02::1:ff79:29fb/0         5      378  0    0   0

This information shows the internal configuration of the "pipes" used to emulate network characteristics. (Note that your output may appear in a different format, depending on what version of ipfw happens to be installed on your delay node. However, the key information is still available.)

You'll want to make note of the two pipe numbers, one for each direction of traffic along your link. In the example above, they are 60111 and 60121.

There are three link characteristics we'll manipulate in this experiment: bandwidth, delay, and packet loss rate. You'll find their values listed in the ipfw output above. The link bandwidth appears on the first line immediately after the pipe number. It's 100Mbps in the example shown above. The next value shown is the delay, 1 ms in the example above. The packet loss rate (PLR) is omitted if it's zero, as shown above. If non-zero, you'll see something like plr 0.000100 immediately after the "50 sl." on the first output line.

It is possible to adjust the parameters of the two directions of your link separately, to emulate asymmetric links. In this experiment, however, we are looking at symmetric links, so we'll always change the settings on both pipes together.

Here are the command sequences you'll need to change your link parameters.

To change bandwidth (100M means 100Mbits/s):

sudo ipfw pipe 60111 config bw 100M
sudo ipfw pipe 60121 config bw 100M

Request a bandwidth of zero to use the full capacity of the link (unlimited):

sudo ipfw pipe 60111 config bw 0
sudo ipfw pipe 60121 config bw 0

To change link delay (delays are measured in ms):

sudo ipfw pipe 60111 config delay 10
sudo ipfw pipe 60121 config delay 10

To change packet loss rate (rate is a probability, so 0.001 means 0.1% packet loss):

sudo ipfw pipe 60111 config plr .0001
sudo ipfw pipe 60121 config plr .0001

Attachments (2)

Download all attachments as: .zip