Code Monkey home page Code Monkey logo

bdp's Introduction

Bandwidth Delay Product Patterns

Visualising stuff is great. You can see patterns and wonder whole day what do they actually mean.

After reading Google's "BBR: Congestion-Based Congestion Control" paper I plotted instantaneous bandwidth vs round trip time and came with those plots:

upload to gmail

Bandwidth-delay product (BDP) is a "product of data link capacity and round trip time". The plot above depicts instantaneous bandwidth (BW) and round trip time (RTT) for acknowledged packets, for 5MB random content content uploaded to Gmail. Horizontal axis is BW, vertical axis is RTT. The colors are time scale. Black points are the earliest ones, yellow the latest ones.

Patterns

There are several patterns emerging in the plot:

  • BDP lines (the curves), which in log-log plot are straight. It means that bandwidth-delay product is constant in some time period. Smells like Little's Law.

  • Discrete BDP curves (parallel lines in log-log plot). This means that BDP, as a property of the system, changes discreetly. I don't know what property of the connection changes though, it doesn't seem to be TCP window size.

  • The patterns are reproducible for the same service, and to some extent are similar between the services. See Gallery for more examples.

  • Different and repeatable "constellations" of points: main set of dots in the middle, flat constellation on the left and also one on the top.

Gallery

The upper row shows BW and RTT in linear scale, the lower row shows part of the data in log-log scale (mind the straight lines!). Each shot was taken three times in a row (pun intended).

Uploading 5MB of random content to gmail.com:

gmail 1 gmail 2 gmail 3

gmail 1 log gmail 2 log gmail 3 log

Uploading 5MB of random content to files.fm:

gmail 1 gmail 2 gmail 3

gmail 1 log gmail 2 log gmail 3 log

Uploading 5MB of random content to uploadfiles.io:

gmail 1 gmail 2 gmail 3

gmail 1 log gmail 2 log gmail 3 log

Running a connection speed test at speedtest.net:

gmail 1 gmail 2 gmail 3

gmail 1 log gmail 2 log gmail 3 log

How to use the tool

bdp tool extracts bandwidth (BW) and round trip time (RTT) from pcap dumps. bdp-plot is a wrapper around gnuplot to plot the output from bdp tool. It works well with with upload traffic, it is not possible to measure precisely BW and RTT for download. Methodology to measure BW and RTT was taken from the previously mentioned paper.

Install:

go install
(cd bdp-plot; go install)
# This is needed for bdp-plot
brew install gnuplot

Dump traffic with:

tcpdump -ieth0 -w dump.pcap -s200 -v

Use "stats mode" to get the IP addresses of the upload:

bdp -i dump.pcap -s
192.168.xxx.xxx    216.58.xxx.xxx     3972
216.58.xxx.xxx     192.168.xxx.xxx    2198
192.168.xxx.xxx    10.15.xxx.xxx      38
192.168.xxx.xxx    192.168.xxx.xxx    30

Now extract the data:

bdp -i dump.pcap -l 192.168.xxx.xxx -r 216.58.xxx.xxx > dump.csv

And plot it:

bdp-plot -i dump.csv -o dump.png

bdp's People

Contributors

jakub-m avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.