CUBIC TCP

Last updated

CUBIC is a network congestion avoidance algorithm for TCP which can achieve high bandwidth connections over networks more quickly and reliably in the face of high latency than earlier algorithms. It helps optimize long fat networks. [1] [2]

Contents

In 2006, the first CUBIC implementation was released in Linux kernel 2.6.13. [3] Since kernel version 2.6.19, [4] CUBIC replaces BIC-TCP as the default TCP congestion control algorithm in the Linux kernel. [3]

MacOS adopted TCP CUBIC with the OS X Yosemite release in 2014, [5] [6] while the previous release OS X Mavericks still used TCP New Reno. [7] [8]

Microsoft adopted it by default in Windows 10.1709 Fall Creators Update (2017), and Windows Server 2016 1709 update. [9]

Characteristics

CUBIC is a less aggressive and more systematic derivative of BIC TCP, in which the window size is a cubic function of time since the last congestion event, with the inflection point set to the window size prior to the event. Because it is a cubic function, there are two components to window growth. The first is a concave portion where the window size quickly ramps up to the size before the last congestion event. Next is the convex growth where CUBIC probes for more bandwidth, slowly at first then very rapidly. CUBIC spends a lot of time at a plateau between the concave and convex growth region which allows the network to stabilize before CUBIC begins looking for more bandwidth. [10]

Another major difference between CUBIC and many earlier TCP algorithms is that it does not rely on the cadence of RTTs to increase the window size. [11] CUBIC's window size is dependent only on the last congestion event. With earlier algorithms like TCP New Reno, flows with very short round-trip delay times (RTTs) will receive ACKs faster and therefore have their congestion windows grow faster than other flows with longer RTTs. CUBIC allows for more fairness between flows since the window growth is independent of RTT.

Algorithm

CUBIC increases its window to be real-time dependent, not RTT dependent like BIC. The calculation for cwnd (congestion window) is simpler than BIC, too.

Define the following variables:

RFC 8312 indicates the following:

Then cwnd can be modeled by:

See also

Apart from window based algorithms like Cubic, there are rate based algorithms (including BBR from Google) that works differently using "sending rate" instead of the window [12]

Related Research Articles

The Transmission Control Protocol (TCP) is one of the main protocols of the Internet protocol suite. It originated in the initial network implementation in which it complemented the Internet Protocol (IP). Therefore, the entire suite is commonly referred to as TCP/IP. TCP provides reliable, ordered, and error-checked delivery of a stream of octets (bytes) between applications running on hosts communicating via an IP network. Major internet applications such as the World Wide Web, email, remote administration, and file transfer rely on TCP, which is part of the Transport Layer of the TCP/IP suite. SSL/TLS often runs on top of TCP.

Darwin is the core Unix operating system of macOS, iOS, watchOS, tvOS, iPadOS, visionOS, and bridgeOS. It previously existed as an independent open-source operating system, first released by Apple Inc. in 2000. It is composed of code derived from NeXTSTEP, BSD, Mach, and other free software projects' code, as well as code developed by Apple.

Explicit Congestion Notification (ECN) is an extension to the Internet Protocol and to the Transmission Control Protocol and is defined in RFC 3168 (2001). ECN allows end-to-end notification of network congestion without dropping packets. ECN is an optional feature that may be used between two ECN-enabled endpoints when the underlying network infrastructure also supports it.

Network congestion in data networking and queueing theory is the reduced quality of service that occurs when a network node or link is carrying more data than it can handle. Typical effects include queueing delay, packet loss or the blocking of new connections. A consequence of congestion is that an incremental increase in offered load leads either only to a small increase or even a decrease in network throughput.

<span class="mw-page-title-main">XNU</span> Computer operating system kernel

XNU is the computer operating system (OS) kernel developed at Apple Inc. since December 1996 for use in the Mac OS X operating system and released as free and open-source software as part of the Darwin OS, which in addition to macOS is also the basis for the Apple TV Software, iOS, iPadOS, watchOS, visionOS, and tvOS OSes.

FAST TCP is a TCP congestion avoidance algorithm especially targeted at long-distance, high latency links, developed at the Netlab, California Institute of Technology and now being commercialized by FastSoft. FastSoft was acquired by Akamai Technologies in 2012.

Transmission Control Protocol (TCP) uses a congestion control algorithm that includes various aspects of an additive increase/multiplicative decrease (AIMD) scheme, along with other schemes including slow start and congestion window (CWND), to achieve congestion avoidance. The TCP congestion-avoidance algorithm is the primary basis for congestion control in the Internet. Per the end-to-end principle, congestion control is largely a function of internet hosts, not the network itself. There are several variations and versions of the algorithm implemented in protocol stacks of operating systems of computers that connect to the Internet.

Nagle's algorithm is a means of improving the efficiency of TCP/IP networks by reducing the number of packets that need to be sent over the network. It was defined by John Nagle while working for Ford Aerospace. It was published in 1984 as a Request for Comments (RFC) with title Congestion Control in IP/TCP Internetworks in RFC 896.

TCP Vegas is a TCP congestion avoidance algorithm that emphasizes packet delay, rather than packet loss, as a signal to help determine the rate at which to send packets. It was developed at the University of Arizona by Lawrence Brakmo and Larry L. Peterson and introduced in 1994.

TCP tuning techniques adjust the network congestion avoidance parameters of Transmission Control Protocol (TCP) connections over high-bandwidth, high-latency networks. Well-tuned networks can perform up to 10 times faster in some cases. However, blindly following instructions without understanding their real consequences can hurt performance as well.

In data communications, the bandwidth-delay product is the product of a data link's capacity and its round-trip delay time. The result, an amount of data measured in bits, is equivalent to the maximum amount of data on the network circuit at any given time, i.e., data that has been transmitted but not yet acknowledged. The bandwidth-delay product was originally proposed as a rule of thumb for sizing router buffers in conjunction with congestion avoidance algorithm random early detection (RED).

BIC TCP is one of the congestion control algorithms that can be used for Transmission Control Protocol (TCP). BIC is optimized for high speed networks with high latency: so-called "long fat networks". For these networks, BIC has significant advantage over previous congestion control schemes in correcting for severely underutilized bandwidth.

Compound TCP (CTCP) is a Microsoft algorithm that was introduced as part of the Windows Vista and Window Server 2008 TCP stack. It is designed to aggressively adjust the sender's congestion window to optimise TCP for connections with large bandwidth-delay products while trying not to harm fairness. It is also available for Linux, as well as for Windows XP and Windows Server 2003 via a hotfix.

H-TCP is another implementation of TCP with an optimized congestion control algorithm for high speed networks with high latency. It was created by researchers at the Hamilton Institute in Ireland.

The TCP window scale option is an option to increase the receive window size allowed in Transmission Control Protocol above its former maximum value of 65,535 bytes. This TCP option, along with several others, is defined in RFC 7323 which deals with long fat networks (LFNs).

Zeta-TCP refers to a set of proprietary Transmission Control Protocol (TCP) algorithms aiming at improving the end-to-end performance of TCP, regardless of whether the peer is Zeta-TCP or any other TCP protocol stack, in other words, to be compatible with the existing TCP algorithms. It was designed and implemented by AppEx Networks Corporation.

QUIC is a general-purpose transport layer network protocol initially designed by Jim Roskind at Google, implemented, and deployed in 2012, announced publicly in 2013 as experimentation broadened, and described at an IETF meeting. QUIC is used by more than half of all connections from the Chrome web browser to Google's servers. Microsoft Edge, Firefox and Safari support it.

Multipath TCP (MPTCP) is an ongoing effort of the Internet Engineering Task Force's (IETF) Multipath TCP working group, that aims at allowing a Transmission Control Protocol (TCP) connection to use multiple paths to maximize throughput and increase redundancy.

LZFSE is an open source lossless data compression algorithm created by Apple Inc. It was released with a simpler algorithm called LZVN.

<span class="mw-page-title-main">MsQuic</span> Microsoft open source library

MsQuic is a free and open source implementation of the IETF QUIC protocol written in C that is officially supported on the Microsoft Windows, Linux, and Xbox platforms. The project also provides libraries for macOS and Android, which are unsupported. It is designed to be a cross-platform general purpose QUIC library optimized for client and server applications benefitting from maximal throughput and minimal latency. By the end of 2021 the codebase had over 200,000 lines of production code, with 50,000 lines of "core" code, sharable across platforms. The source code is licensed under MIT License and available on GitHub.

References

  1. Sangtae Ha; Injong Rhee; Lisong Xu (July 2008). "CUBIC: A New TCP-Friendly High-Speed TCP Variant" (PDF). ACM SIGOPS Operating Systems Review. 42 (5): 64–74. doi:10.1145/1400097.1400105. S2CID   9391153. Archived from the original (PDF) on July 26, 2015. Retrieved September 29, 2015.
  2. Sangtae Ha; Injong Rhee; Lisong Xu; Lars Eggert; Richard Scheffenegger (February 2018). CUBIC for Fast Long-Distance Networks. doi: 10.17487/RFC8312 . RFC 8312.
  3. 1 2 Ha, Sangtae; Rhee, Injong; Xu, Lisong (2008). "CUBIC: A New TCP-Friendly High-Speed TCP Variant". ACM SIGOPS Operating Systems Review. ACM New York, NY, USA. 42: 11. doi:10.1145/1400097.1400105. S2CID   9391153.{{cite journal}}: CS1 maint: date and year (link)
  4. "[TCP]: Make cubic the default · torvalds/Linux@597811e". GitHub .
  5. "apple-oss-distributions/distribution-macOS at os-x-1010". GitHub . TCP Congestion Control is implemented in the XNU Kernel, this commit references the XNU Kernel used in Mac OS X Yosemite
  6. "xnu/tcp_cc.h at a3bb9fcc43a00154884a30c9080595284c26cec9 · apple-oss-distributions/xnu". GitHub . April 29, 2022.Header file of the TCP congestion control implementation of the XNU Kernel used in Mac OS X Yosemite stating CUBIC as default
  7. "apple-oss-distributions/distribution-macOS at os-x-1095". GitHub .References XNU Kernel used in Mac OS X Mavericks
  8. "xnu/tcp_cc.h at d2a0abf2ede8152c5a107fe51e032c1193d2015b · apple-oss-distributions/xnu". GitHub . April 29, 2022. Header file of the TCP congestion control implementation of the XNU Kernel used in Mac OS X Mavericks stating New Reno as default
  9. Microsoft (November 15, 2017). "Updates on Windows TCP" (PDF).
  10. Tetcos Engineering (2014). "Comparison of TCP congestion control algorithms" (PDF). Archived (PDF) from the original on March 31, 2017. Retrieved August 6, 2017.
  11. La Rosa, Alexander (10 July 2019). "Why does CUBIC take us back to TCP congestion control?". Pandora FMS . Archived from the original (html) on 12 July 2019. Retrieved 12 July 2019. The intention is to have an algorithm that works with congestion windows whose incremental processes are more aggressive, but are restricted from overloading the network. In order to achieve this, it is proposed that the scheme for increasing and decreasing the transmission ratio be established according to a cubic function.
  12. "Congestion control, PK3C Kernel Module rate based for video streaming and data servers". GitHub . Retrieved August 1, 2021.