Quiz 2 - CPSC 4240/6240 Spring 2017 Solution

 

Step 1 - download, unpack and build the UDPEcho2 package

On your VM,

(If you don't have wget, issue 'sudo apt-get install wget' )

Unpack and build:

 

Step 2. Get familiar with the client and server - source code, usage, make several extensions

Read the readme.txt and look over the client and server code - see https://people.cs.clemson.edu/~jmarty/courses/Spring-2017/CPSC424/code/UDPEcho2/

Please make the following changes

 

Step 3 Collect Data - Perform two experiments

For both experiments, the following holds:

Run the server : ./server 5000

Run the client : ./client localhost 5000 100000 1000 5000 > exp*Results.dat ; 5000 iterations, 0.100 seconds (100000 useconds) iteration delay, 1000 byte msg size, 5000 iterations

Develop a simple bash script that uses awk and processes the file as follows:

Finally, use matlab, octave, excel, (or any tool you want) to plot the probability distribution of the data set of RTTs.

 

This is a matlab script that reads an input file (currently set to ping.dat, modify that line to read in your data file, with a timeseries of data (1 field per line representing the number of milliseconds) ), it does a pass through the data to deal with outliers (defines a maxValue - you would need to adjust this to fit your data set), and then generates a probability distribution. In matlab, this is done in two steps - first the data is binned to create a historgram; second that data is normalized by modifying the y axis data to be a frequency of occurrence which when plotted with an X axis of the possible values in the data set produces the probability distribution. If you just plot the histogram that is OK for the quiz but for future questions make sure you refresh your memory related to probability distributions.

Step 4. Submission: two components

 

Solution: The modified UDPEcho2 is in the package UDPEchoV1-2.tar.gz

 

We ran the server on a Mac and two clients on two different Linux machines. All three Hosts were connected by WiFi.

Both clients were run on a VM on two diffferent laptops. Client 1 on as follows: ./client 192.168.0.9 5000 1000000 1000 2000 130
The server : ./server 5000 130

MacOS ---- ./server 5000 130 ----- wifi ----|---->two Linux Hosts (client1 and client2)

 

 

 

 

 

RTT data analysis. You can use any tool you wish to generate the probability distributions. I used the following to create a single column of data from the VMtoVM.dat or VMtoIMP8.dat files (the RTT samples are the second field in units of seconds).

 

For excel, you can create a histogram chart. You can input the single column data RTT1.dat or the VMtoVM.dat. We have a start to this with this excel document.

 

This page shows how to plot a histogram with recent version of Excel.

Matlab is available for all operating systems from CCITs download site. You can also use octave - this is an open source tool that is compatible with Matlab (on Ubuntu sudo apt-get install octave ). For the most part, matlab scripts run with no change in octave. The results shown below were generated with the plotDataPDF.m script available https://people.cs.clemson.edu/~jmarty/courses/Spring-2017/CPSC424/quizzes/quiz2-sol/

 

 

Figures 1 -3 visualize the results based on the three invocations of plotDataPDF using the VMtoVM.dat data. (Figure 1a removes the outliers rather than resets to the max allowed value)

Figures 4-6 visualize the results based on the VMtoIMP8.dat data.

Figures 7-8 plots the scatter plot of VMtoVM and VMtoIMP8 respectively.

Figures 9-10 visualize the autocorrelation of each data set to a max lag given by the number of samples.

Highlights of these results:

Figure 4- 6 plot the VM to IMP8 RTT data.

 

 

 

 

Figure 1 - VM to VM distribution : plotDataPDF(1, 0, 0.40) - reset outliers to max allowed value

 

Figure 1a - VM to VM distribution : plotDataPDF(1,0,0.40) - removed outliers

Figure 2 - VM to VM distribution : plotDataPDF(1, -1, 0.50)

 

Figure 3 - VM to VM distribution : plotDataPDF(2, 2000, 300)

 

Figure 4 - VM to IMP8 distribution : plotDataPDF(1, 0, 0.40)

 

Figure 5 - VM to IMP8 distribution : plotDataPDF(1, -1, 0.50)

 

Figure 6 - VM to IMP8 distribution : plotDataPDF(2, 2000, 50000)

 

 

Figure 7 VM to VM scatter plot : scatter(1,1) : specifies the VMtoVM data set with a lag of 1

 

Figure 8 VM to IMP8 scatter plot : scatter(1,1) : specifies the VMtoIMP8 data set with a lag of 1

 

Figure 9 VMtoVM autocorrelation : plotAutoCorrelation(1)

 

Figure 10 VMtoIMP8 autocorrelation : plotAutoCorrelation(2)

last update: 3/2/2017