Sunday, May 1, 2016

TCP reloaded (part 4)

Exploratory Analysis - step #3

In this post I will enhance the exploratory analysis with some phase diagrams able to highlight inter-relationships between TCP variables together with their dynamic behavior. As a first action, I load back the same dataset already outlined in the previous post.

suppressPackageStartupMessages(library(ggplot2))
suppressPackageStartupMessages(library(Rmisc))
suppressPackageStartupMessages(library(knitr))

df <- read.csv("TCP_ea.csv", header=TRUE, stringsAsFactors = TRUE, sep=",")

I am going to show various phase diagrams, highlighting the drop loss probability with a color gradient scale as legend.

First phase diagram is about the round-trip-time vs queue length.

p.col <- c("darkgreen", "yellow", "orange", "red")
ggplot(data=df, aes(x=q, y=R, color=p)) + geom_path() + geom_point() +
  scale_colour_gradientn(colours=p.col)

It is rather evident the linear relationship between queue length and round trip time, which is expected by TCP equations outlined in first TCP post.

Second phase diagram, is about the queue length moving average against the instantaneous queue length.

ggplot(data=df, aes(x=q, y=x, color=p)) + geom_path() + geom_point() +
  scale_colour_gradientn(colours=p.col) 

It can be observed as the moving average x follows with some amount of delay the instantaneous queue value. After an initial slow increase of x, it follows the queue value in a linear fashion. Once reached the queue top value, it starts a cyclical pattern whereby the x value follows q with some delay.

Third phase diagram it is an interesting plot of the TCP sender window versus the istantaneous queue buffer size value.

ggplot(data=df, aes(x=W, y=q, color=p)) + geom_path() + geom_point() +
  scale_colour_gradientn(colours=p.col) 

The slow start threshold we used is equal to 10 and from the plot above it can be observed how the queue size starts considerably growing once surpassed such threshold. The window size is periodically reduced by multiplicative decrease behavior as consequence of drop events. That implies a cyclical grow and reduction of TCP sender window, which reflects onto the buffering amount.

Fourth phase diagram shows TCP sender window and round-trip-time.

ggplot(data=df, aes(x=W, y=R, color=p)) + geom_path() + geom_point() +
  scale_colour_gradientn(colours=p.col) 

Due to linear relationship between q and R, the phase diagram above is similar to the one showing W and q.

The following phase diagram is the most interesting one as it shows the transmission rate versus the round-trip-time.

ggplot(data=df, aes(x=R, y=S, color=p)) + geom_path() + geom_point() +
  scale_colour_gradientn(colours=p.col)

It is interesting to highlight the cyclical pattern which is composed by basically two paths. The first path shows a close to constant S value and growing R. After, the second path is represented by the curve which brings back R to lower values as a result of the multiplicative decrease of the TCP sender window.

Further, plots of the TCP transmission rate against the round-trip-time conditioned on TCP status.

ggplot(data=df, aes(x=R, y=S, colour=status)) + geom_point() 

It is evident now as the cyclical pattern is related to the congestion avoidance steady state.

To follow, phase diagrams with TCP status highlighted with different colors are shown.

ggplot(data=df, aes(x=W, y=S, colour=status)) + geom_point() 

ggplot(data=df, aes(x=q, y=S, colour=status)) + geom_point() 

ggplot(data=df, aes(x=W, y=R, colour=status)) + geom_point() 

ggplot(data=df, aes(x=R, y=q, colour=status)) + geom_point() 

To follow, phase diagrams of TCP sender rate versus R highlighting the corresponding rate slope and rate level.

ggplot(data=df, aes(x=R, y=S, colour=S_slope)) + geom_point()

ggplot(data=df, aes(x=R, y=S, colour=S_slope_rate)) + geom_point() 

From the above phase diagrams above, it is put in evidence that:

  • there is a sharp linear relationship between instantaneous buffer queue length and round-trip-time, which is an expected result by the TCP equations model.

  • congestion avoidance steady state shows a cycle pattern between observed variables pairs (q, x), (W, q), (W, R), (R, S), (W, S), (q, S)

  • the drop probability values greater than zero are quite limited and their effect is to reduce W and as a consequence both R and S

  • congestion avoidance steady state shows an interesting cycle sub-path characterized by quite low R value and close to top values S. Unfortunately TCP window increases more on and so the buffer queue length does, resulting with a remarkable increase of the round-trip-time

In my next post, I will discuss about TCP working points and their main features.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.