CUBIC (also called TCP CUBIC) is a loss-based congestion control algorithm that sets the TCP congestion window as a cubic function of the time elapsed since the last packet loss, rather than as a function of round-trip times. Among transport protocols in networking, it is one of the most widely deployed algorithms: it has been the default in Linux since kernel 2.6.19 and is also the default in modern Windows and macOS stacks.
CUBIC was designed for high bandwidth-delay product networks, where classic Reno-style growth of one segment per round trip takes far too long to fill a fast, long-distance path. It is standardized by the IETF in RFC 9438, which replaced the earlier informational RFC 8312.
How CUBIC grows the congestion window
CUBIC computes the congestion window directly from a cubic growth function of wall-clock time. The core formula is W(t) = C x (t – K)^3 + W_max, where W_max is the window size just before the last loss, C is a scaling constant, t is the time since the last window reduction and K is the time the function needs to climb back to W_max.
The shape of this curve gives CUBIC its typical behavior. Right after a loss, the window grows quickly in the concave region, slows to a near-plateau as it approaches W_max, and then accelerates again in the convex region to probe for newly available bandwidth. This means the algorithm spends most of its time close to the last known saturation point, which keeps utilization high while staying cautious near the level that previously caused loss.
When a loss is detected, CUBIC applies a multiplicative decrease with a factor called beta, set to 0.7. The window shrinks to 70 percent of its previous value instead of the 50 percent used by Reno, so recovery is shorter and throughput dips less after each congestion event.
The following table lists the main parameters defined for CUBIC and what each one controls.
| Parameter | Typical value | What it controls |
|---|---|---|
| C | 0.4 | Aggressiveness of the cubic curve |
| Beta | 0.7 | Window after a loss, as a share of the old window |
| W_max | Measured at loss | Plateau target for the next growth phase |
| K | Derived from C, beta and W_max | Time to return to W_max |
| Fast convergence | Enabled by default | Releases bandwidth faster when new flows join |
Why CUBIC uses time instead of round trips
Classic algorithms increase the window once per acknowledged round trip, so a flow with a short RTT grows faster than a flow with a long RTT. This creates RTT unfairness: two transfers sharing one bottleneck receive very different shares of bandwidth simply because one server is closer.
Because CUBIC ties growth to elapsed real time, flows with different round-trip times follow roughly the same curve and converge toward fairer bandwidth shares. The improvement is substantial but not perfect, since loss detection and acknowledgment clocking still depend on RTT.
CUBIC also includes a TCP-friendly region. When the path has a small bandwidth-delay product, it estimates what standard Reno would achieve and uses that larger value if the cubic curve would be slower. This keeps CUBIC no worse than Reno on short, slow links, which was a requirement for safe deployment on the public internet.
CUBIC compared with Reno and BBR
CUBIC sits between the older Reno family and the newer model-based BBR. The comparison below shows how they differ in their signal and behavior.
| Algorithm | Congestion signal | Growth pattern | Main weakness |
|---|---|---|---|
| Reno / NewReno | Packet loss | Linear, one segment per RTT | Very slow on fast long paths |
| CUBIC | Packet loss | Cubic function of time | Fills buffers and adds queuing delay |
| BBR | Bandwidth and RTT model | Paced probing cycles | Can be unfair to loss-based flows |
| Vegas | Rising delay | Delay-based adjustment | Starved by loss-based competitors |
The key distinction is that CUBIC, like Reno, treats packet loss as the congestion signal. It keeps increasing the window until a router queue overflows. On paths with large buffers, this produces standing queues and higher latency, a problem known as bufferbloat. BBR instead estimates the bottleneck bandwidth and minimum RTT and paces packets to avoid filling queues, which can help latency but changes how competing flows share capacity.
Where CUBIC fits in practice
CUBIC works as part of the broader TCP congestion control framework. It replaces the congestion avoidance phase, while TCP slow start (often with HyStart to exit slow start before heavy loss), fast retransmit, fast recovery and selective acknowledgment remain in place. It operates only on the sender side, so no receiver changes are needed.
On Linux, the active algorithm is visible and configurable through the net.ipv4.tcp_congestion_control sysctl, and individual applications can select an algorithm per socket with the TCP_CONGESTION socket option. QUIC implementations commonly ship their own CUBIC variant in user space.
The decision table below summarizes when CUBIC remains a sensible choice and when an alternative may suit the path better.
| Situation | Recommended choice | Reason |
|---|---|---|
| General servers and clients | CUBIC | Mature, fair and widely tested |
| Long fat networks with low loss | CUBIC | Fast window recovery after losses |
| Lossy wireless or satellite links | BBR or tuned settings | Random loss is misread as congestion |
| Latency-sensitive traffic with deep buffers | BBR plus active queue management | Avoids standing queues |
| Mixed flows in a data center | DCTCP or similar | ECN-based control keeps queues short |
Limitations and common misconceptions about CUBIC
The main limitation of CUBIC is its dependence on loss as a signal. On wireless or long-haul links where packets are dropped by corruption rather than congestion, every random loss triggers a 70 percent window reduction, which can cut throughput well below the capacity of the path.
| Symptom | Likely cause | Typical remedy |
|---|---|---|
| High latency under load | CUBIC filling a deep buffer | Enable AQM such as fq_codel |
| Low throughput on Wi-Fi | Random loss treated as congestion | Test BBR, reduce link errors |
| Uneven sharing between flows | Large RTT differences or mixed algorithms | Use fair queuing at the bottleneck |
| Slow ramp-up on new connections | Slow start exit, small initial window | Check initial window and HyStart |
- CUBIC is not delay-aware: it does not react to rising queuing delay until a packet is lost or marked with ECN.
- CUBIC does not replace slow start: it governs congestion avoidance after the first loss or slow start exit.
- Changing the algorithm on the client rarely affects downloads, because the sender controls congestion behavior.
- The name is not an acronym; it refers to the cubic polynomial used for window growth.
In simple terms
CUBIC is the rule a computer follows to decide how fast to send data without overloading the network. When data starts getting lost, it slows down a bit. Then it speeds up again, quickly at first, carefully near the speed that caused trouble last time, and faster again if the road seems clear.
Think of a driver who remembers where a traffic jam happened. After braking, the driver accelerates briskly, eases off near that spot, and only pushes harder once it is clearly free. The key idea is that CUBIC learns from the last problem and spends most of its time near the best safe speed.
A practical example
A media company replicates large video archives from a data center in Frankfurt to a backup site in Virginia over a 10 Gbit/s link with about 90 ms round-trip time. With Reno, every single loss halved the window, and climbing back to full speed took many minutes, so a nightly transfer of 20 TB regularly overran its window.
After the engineers confirmed that the Linux servers were using CUBIC with default settings, they added fair queuing on the sending hosts and verified a low loss rate on the path. The window now recovered to its previous size within seconds after each loss. Average throughput rose to about 7-8 Gbit/s, and the nightly replication finished well inside its scheduled time without any change on the receiving side.