Giter VIP home page Giter VIP logo

bbr's Introduction

README

BBR' source code and test scripts for ns-3 (version 3.27).

See the WNS3 Workshop paper (CCL18b) for a peer-reviewed overview.

See the Technical Report (CCL18a) for details.

-- Mark Claypool [email protected]


Directories | Install | Misc | ToDo | Referenes


DIRECTORIES

tests/ - test scripts for BBR'.

src/ - BBR' source code and ns-3 source files that need changes.

patch/ - directory with patchfile for ns-3 allinone tree.

INSTALL

These instructions are to install BBR' to the ns-allinone package (version 3.27). Mileage may vary for alternate uses.

ROOT = ns-3 all-in-one directory

e.g., /home/claypool/ns-allinone-3.27

REPO = this git repository

To install, either see Applying Repository Patch or Linking to Repository.

  1. Download the latest "all in one" zip file from:

    https://www.nsnam.org/releases/

  2. Extract:

    tar xvjf *.tar.bz2

  3. Apply patch:

    patch -p0 < REPO/patch/*.patch

  4. Go to ROOT and build:

    cd ROOT/

    ./build.py --enable-examples --enable-tests

  5. Run and analyze. Example:

    cd ROOT/ns-3.27/

    ./waf --run bulk

Linking to Repository

  1. Download the latest "all in one" zip file from:

    https://www.nsnam.org/releases/

  2. Extract:

    tar xvjf *.tar.bz2

  3. Go to ROOT and build:

    cd ROOT/

    ./build.py --enable-examples --enable-tests

  4. Go to ROOT source(s) and link in BBR' and supporting files:

    cd ROOT/ns-3.27/src/internet/model

    ln -s REPO/src/bbr/*.cc .

    ln -s REPO/src/bbr/*.h .

    ln -sf REPO/src/internet/*.cc .

    ln -sf REPO/src/internet/*.h .

    ln -sf REPO/src/internet/*.h .

(If using APP_PACING config, do below):

cd ROOT/ns-3.27/src/applications/model

ln -sf REPO/src/applications/*.cc .

ln -sf REPO/src/applications/*.h .
  1. Edit script file to build BBR':

    edit ROOT/ns-3.27/src/internet/wscript

Add (line 152):

    'model/tcp-bbr.cc',

    'model/tcp-bbr-state.cc',

Add (line 380):

      'model/tcp-bbr.h',

      'model/tcp-bbr-state.h',
  1. Link BBR' script test:

    cd ROOT/ns-3.27/examples/

    ln -s REPOSITORY/bbr-tests .

  2. Run and analyze. Example:

    cd ROOT/ns-3.27/

    ./waf --run bulk

MISC

Configurations

Pacing

There are three possible pacing configurations for BBR':

  1. TCP_PACING. Packet pacing is done in TCP, as per the BBR' Technical Report CCL18a. This is the default configuration.

  2. APP_PACING. Packet pacing is NOT done in TCP. BBR changes the pacing rate and still expects packets to be paced, but in this configuration, the application layer must do the pacing. The application directory provides a BulkSendApplication that does pacing.

  3. NO_PACING. Pacing is not done at all. In this configuration, the BBR' code changes slightly. Instead of having a larger cwnd and having the pacing rate control the bandwidth, the cwnd itself is used to control the bandwidth. Thus, the cwnd is set to the BDP (with any needed gain adjustments) as the sole way of controlling the rate.

Configurations are controlled via PACING_CONFIG in:

ROOT/ns-3.27/src/internet/model/tcp-socket-base.h

e.g.,

const enum_pacing_config PACING_CONFIG = NO_PACING;

Timing

There are two possible configurations for the round-trip time used in culling the bandwidth window.

  1. PACKET_TIME. Bandwidth window culling is done with a count of "packet-timed" round-trips, as described in CCYJ17. This is the default configuration.

  2. WALLCLOCK_TIME. Bandwidth window culling is done using the wall-clock for timing. In this configuration, bandwidth estimates that are older than the minimum round-trip time are removed from the bandwidth window.

Time configurations for bandwidth culling are controlled via TIMING_CONFIG, defined in tcp-bbr.h. e.g.,

const enum_time_config TIME_CONFIG = PACKET_TIME;

Buffer Limits

Note, the fixed limits TCP receive and send buffers can restrict throughput for some ns-3 simulations (and real TCP connections). In order to have the congestion window (i.e., the bottleneck bandwidth) be the limit instead, the send/receive buffers can be increased from their defaults (128k in ns-3).

To do so, change the ns-3 attributes "SndBufSize" and "RcvBufSize" via script parameters. For example, to double the default size (131072 bytes):

Config::SetDefault("ns3::TcpSocket::RcvBufSize", UintegerValue(131072*2));

Config::SetDefault("ns3::TcpSocket::SndBufSize", UintegerValue(131072*2));

For reference, the source file that sets these values is:

ROOT/ns-3.27/src/internet/model/tcp-socket.cc

TODO

Below are BBR features not currently supported by BBR' (section numbers below refer to CCYJ17):

  • BBR' assumes that the application always has data to send, thus the transmission rate is limited by the congestion control algorithm, not the application. BBR includes features to handle transmissions that are application-limited. See Section 4.1.1.4. This also means BBR' does not support restarting a flow from idle, a special case in BBR. See Section 4.3.4.4.

  • BBR' only transitions to/from PROBE_RTT from PROBE_BW, while BBR has additional transitions for PROBE_RTT. See Section 4.3.5.

  • BBR' does not include the "send quantum" in BBR which is used to amortize per-packet host overheads involved in the sending process. The send quantum parameter can be helpful at low rates with small packets. See Section 4.2.2.

REFERENCES

[CCG+17] N. Cardwell, Y. Cheng, C.S. Gunn, S.H. Yeganeh, and V. Jacobson. BBR: Congestion-Based Congestion Control, Communications of the ACM, 60(2), February 2017.

[CCL18a] M. Claypool, J.W. Chung, and F. Li. "BBR' - An Implementation of Bottleneck Bandwidth and Round-trip Time Congestion Control for ns-3", Technical Report WPI-CS-TR-18-01, Computer Science, Worcester Polytechnic Institute, January 2018. Online: ftp://ftp.cs.wpi.edu/pub/techreports/pdf/18-01.pdf

[CCL18b] M. Claypool, J.W. Chung, and F. Li. BBR' - An Implementation of Bottleneck Bandwidth and Round-trip Time Congestion Control for ns-3, In Proceedings of the Workshop on ns-3 (WNS3), Mangalore, India, June 2018.

"BBR' - An Implementation of Bottleneck Bandwidth and Round-trip Time Congestion Control for ns-3", Technical Report WPI-CS-TR-18-01, Computer Science, Worcester Polytechnic Institute, January 2018. Online: ftp://ftp.cs.wpi.edu/pub/techreports/pdf/18-01.pdf

[CCYJ17] N. Cardwell, Y. Cheng, S. H. Yeganeh, and V. Jacobson. BBR Congestion Control, IETF Draft draft-cardwell-iccrg-bbr-congestion-control-00, July 2017.


Directories | Install | Misc | ToDo | Referenes


bbr's People

Contributors

mark-claypool avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bbr's Issues

Error in running ./waf --run bulk

Hi. I have an error in running command ./waf --run bulk . errors are :
../src/internet/model/tcp-westwood.cc:166:22: error: ‘const class ns3::TcpSocketState’ has no member named ‘m_minRtt’

This error occurs in many .cc files.
I build the project based on the Linking Install Part, and my ns3 version is 3.28.

Please Give me help! Thanks.

Issues in BW estimation

Based on my testing, the tcp-bbr may over-estimate the BW during loss recovery. The packet.delivered in BBR paper is recorded by the m_lastAckedSeq, which is the cumulative ACK while there may be lots of SACK ignored. During loss recovery, new data can still get sent if window allows. This can potentially lead to BW over-estimation when their ACKs get back and cumulatively ack all the already SACKed data.

It seems that the line 389 of tcp-bbr.cc, i.e., if (!m_in_retrans_seq) {, tries to avoid the issue, but not completely resolves it. To address it, we can extend that line to:
if (!m_in_retrans_seq && tcb->m_congState==TcpSocketState::CA_OPEN) {

Copy Constructor implemented incorrectly.

The copy constructor here is implemented incorrectly. This results in buggy behavior. The expected constructor should copy over the configuration of the previous object, as well as the BBR States. The problem occurs when the object is copied over, and the state pointer is set to NULL in the bbr machine.

TcpBbr::TcpBbr(const TcpBbr &sock) :

I have fixed it locally, but the solution is really hacky, thus no PR

Patch for NS3 3.31 and forward

Hi

how can I apply the patch to NS 3.31? or newer versions (or ns-dev)? I'm trying to use the first method but it seems to not work properly

Do I miss something?

thank you

Ric

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.