项目作者: jakub-m

项目描述 :
Analyse bandwidth-delay product
高级语言: Go
项目地址: git://github.com/jakub-m/bdp.git
创建时间: 2017-09-10T08:55:09Z
项目社区:https://github.com/jakub-m/bdp

开源协议:MIT License

下载


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:

  1. go install
  2. (cd bdp-plot; go install)
  3. # This is needed for bdp-plot
  4. brew install gnuplot

Dump traffic with:

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

Use “stats mode” to get the IP addresses of the upload:

  1. bdp -i dump.pcap -s
  2. 192.168.xxx.xxx 216.58.xxx.xxx 3972
  3. 216.58.xxx.xxx 192.168.xxx.xxx 2198
  4. 192.168.xxx.xxx 10.15.xxx.xxx 38
  5. 192.168.xxx.xxx 192.168.xxx.xxx 30

Now extract the data:

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

And plot it:

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