Difference between revisions of "GSOC2020Prague"

From Nsnam
Jump to: navigation, search
m (Weekly Reports)
m (Project Overview)
Line 8: Line 8:
 
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]
 
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]
 
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]
 
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]
* '''Project Goals:''' Scalable congestion controls such as DCTCP improve performance over Reno and Cubic, which perform badly in high-speed networks (because of their slow response with large congestion windows). Several additional modifications over DCTCP have been drafted into the protocol called TCP Prague, that aims to integrate scalable congestion control into the Internet while still allowing it to coexist with current Classic protocols. This project would complete the integration and testing of fallback detection, RTT independence and pacing into the TCP Prague model of ns-3. The project would also validate the aforementioned implemenation against Linux and document the changes made. My proposal can be found [https://docs.google.com/document/d/17WmcPW74gGmAB_mg1y4B_ZRptNgEPkPWAzpEyK86RA4/edit?usp=sharing here].
+
* '''Project Goals and Outcomes:''' The original plan at the start of this project was to add TCP Prague to ns-3 mirroring ns-3 DCTCP, implement Classic ECN detection, RTT independence and Dynamic pacing. After several discussions with my mentors, these goals and priorities were altered. The following features have been implemented in ns-3 at the end of this project:
 +
** Dynamic pacing model to TCP with a test suite ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 link to code])
 +
** TCP Prague that aligns with contemporary Linux implementation, with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 link to code])
 +
** RTT independence in TCP Prague, with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 link to code])
 +
** Experiments to generate plots and validate the ns-3 implementation of TCP Prague with Linux ([https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- links] [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ to] results)
 +
* '''Future Work:'''
 +
* '''Project Page:''' A [https://deepakkavoor.github.io/gsoc-2020-prague/ project page] was also added to give an elaborate explanation of the different features implemented as part of this work.  
 
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]
 
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks, protocol design, cryptography and security. Previously, I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).
+
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks and cryptography. Previously I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).
  
 
= Milestones and Deliverables =
 
= Milestones and Deliverables =

Revision as of 04:03, 29 August 2020

Main Page - Current Development - Developer FAQ - Tools - Related Projects - Project Ideas - Summer Projects

Installation - Troubleshooting - User FAQ - HOWTOs - Samples - Models - Education - Contributed Code - Papers

Back to GSoC 2020 projects

Project Overview

  • Project Name: TCP Prague model for ns-3
  • Student: Deepak K
  • Mentors: Ankit Deepak, Mohit Tahiliani, Vivek Jain, Viyom Mittal
  • Project Goals and Outcomes: The original plan at the start of this project was to add TCP Prague to ns-3 mirroring ns-3 DCTCP, implement Classic ECN detection, RTT independence and Dynamic pacing. After several discussions with my mentors, these goals and priorities were altered. The following features have been implemented in ns-3 at the end of this project:
    • Dynamic pacing model to TCP with a test suite (link to code)
    • TCP Prague that aligns with contemporary Linux implementation, with unit tests (link to code)
    • RTT independence in TCP Prague, with unit tests (link to code)
    • Experiments to generate plots and validate the ns-3 implementation of TCP Prague with Linux (links to results)
  • Future Work:
  • Project Page: A project page was also added to give an elaborate explanation of the different features implemented as part of this work.
  • Repository: https://gitlab.com/deepakkavoor/ns-3-dev
  • About Me: I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks and cryptography. Previously I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my commit).

Milestones and Deliverables

The original goal as per the proposal was to add Classic ECN Detection for TCP Prague in Phase 1, RTT Independence in Phase 2, and Pacing in Phase 3.

Phase 1

  • It was decided that dynamic pacing should be integrated first. The goal is to align ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. The value of factor depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.
pacing_rate = factor * cwnd * mss / rtt
  • Rebased Joakim Misund's TCP Prague implementation and added the above dynamic pacing feature to it.
  • A test suite was also added to check that packets are correctly paced out as per the above update equation.
  • Generated plots for congestion windows and pacing rates in ns-3 and Linux, and justified the differences if any (this is currently being done).

Phase 2

This phase would focus on RTT Independence, and writing tests to validate the implementation. During this phase, the following additional tasks need to be considered as well:

  • Adding documentation to Paced Chirping implementation from Joakim Misund
  • Restructuring the Paced Chirping implementation to reduce close coupling with ns-3 Congestion Controls.
  • Finalizing the rebased ECN++ and AccECN code written during GSoC 2018.

Phase 3

This phase would refactor the ns-3 Prague code to align with Linux. Along with this, we would need to run experiments and obtain aligning plots between ns-3 and Linux implementations of Prague.

A more elaborate description on alignment results can be found here: https://deepakkavoor.github.io/gsoc-2020-prague/

Weekly Reports

Community Bonding Period (May 4 - May 31)

  • Established the Wiki page for this project.
  • Rebased the GSoC 2018 implementation of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my repository
  • Went through the TCP models and architecture in ns-3 and studied about Paced Chirping.

After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on pacing in TCP Prague.

Week 1 (June 1 - June 7) (Start of Phase 1)

  • Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found here.
  • Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods PacingEnabled and UpdatePacingRate. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.

Week 2 (June 8 - June 14)

  • Aligned ns-3 Prague with Linux by enabling TcpPrague::CongControl.
  • Designed a test suite TcpPacingTest to test TCP packet pacing rate during Slow Start and Congestion Avoidance.
  • Rebased Joakim Misund's work on ns-3 Prague to latest ns-3-dev.
  • Generated an MR to add support for TCP Prague and pacing, along with the above test suite.

Week 3 (June 15 - June 21)

  • Worked on fixing a few issues with the MR generated in Week 2.
  • Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this document (work in progress).
  • Added code to enable different scaling heuristics (similar to Linux).
  typedef enum
  {
    RTT_CONTROL_NONE,      //!< No RTT Independence
    RTT_CONTROL_RATE,      //!< Flows with e2e RTT < target try to achieve same throughput
    RTT_CONTROL_SCALABLE,  //!< At low RTT, trade throughput balance for same marks/RTT
    RTT_CONTROL_ADDITIVE   //!< Behave as a flow operating with extra target RTT
  } RttScalingMode_t;
  • The initial commit can be found here.

Week 4 (June 22 - June 28)

  • Divided the MR (from Week 2) to now separately add support for dynamic pacing (!339) and TCP Prague (!331).
  • Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.
  • Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed significant differences; we are currently trying to identify why linux has more frequent cwnd oscillations compared to ns-3.

Week 5 (June 29 - July 5)

  • Generated merge requests for ECN++ and AccECN (rebased from Wenying Dai's GSoC 2018 work).
  • Added dynamic pacing to other congestion controls in ns-3.
  • Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.

Week 6 (July 6 - July 12)

  • Extended examples/tcp/tcp-pacing.cc to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.
  • Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.

Week 7 (July 13 - July 19)

  • Explored different topologies and configurations that would show the benefits of TCP pacing.
  • Modified the pacing example to follow the topology as given in Figure 2 here.
  • Continued the work on RTT Independence and added/modified the following methods:
    • TcpPrague::AiAckIncrease (): Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.
    • TcpPrague::IncreaseWindow (): Consider the RTT scaling factor when updating cWnd during AI.
    • TcpPrague::PktsAcked (): Apply the EWMA update equation and increase round count only if the value returned by TcpPrague::ShouldUpdateEwma () is true.

Week 8 (July 20 - July 26)

  • Improved and refactored the code for Prague RTT independence.
  • Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.
  • Fixed bugs in ECN++ and AccECN code that were causing DCTCP tests to fail.
  • Participated in the IETF 108 Hackathon and helped with integration of Prague alongside other L4S components.

Week 9 (July 27 - August 02)

  • Setup and built a kernel supporting Prague, DualQueue and AccurateEcn by referring to the Linux development branch here.
  • Worked on setting up a topology in this kernel using Linux namespaces.

Week 10 (August 03 - August 09)

  • Tried to run experiments with the l4s-evaluation module to show that Prague experiences higher throughput in presence of other Classic flows.

Week 11 (August 10 - August 16)

  • Major refactoring of ns-3 Prague code to match the Linux implementation.
  • Validated this implementation against Linux namespaces and obtained alignment in the one-flow scenario.

Week 12 (August 17 - August 23)

  • Worked on obtaining results in the two-flow scenario to test working of RTT independence.
  • Worked on documentation of ns-3 Prague.
  • Worked on project site.

Week 13 (August 24 - August 30)

  • Added doxygen comments and slight cleanup of TCP Prague code.
  • Setup an MR for the TCP Prague model.
  • Fixed issues related to delayed acknowledgements in the TCP pacing test suite.
  • Worked on understanding how TCP system tests are written in ns-3.