Network lab · TCP congestion control

Bufferbloat Simulator

Why does your ping jump to 500 ms when someone uploads a video? Watch TCP fill a router's buffer packet by packet, then fix it with BBR, CoDel or FQ-CoDel

Quick Answer:Bufferbloat is extra latency caused by an oversized, unmanaged buffer at the slowest link – usually your router or modem upload. Loss-based TCP (CUBIC, the default on Windows, macOS and Linux) speeds up until a packet is dropped, so it fills the whole buffer: 1,000 packets on a 20 Mbps link is 600 ms of waiting for every ping and voice packet. Smart queue management fixes it: FQ-CoDel drops packets that waited more than 5 ms and gives each flow its own queue, which in this simulation cuts the added latency from about 525 ms to under 1 ms while the link stays 97 % busy.

--

--

--

Bufferbloat grade

--

--

--

Throughput

--

Ping median / 95 %

--

Flow 1 / flow 2

--

Packets dropped

--

Bandwidth × delay

--

Full buffer = wait

--

One flow on this link: added ping · link use

Computing…

The connection

--

Ping while the link is busy

Round-trip time of a small ping sent through the same router (yellow) against the idle ping (grey). The gap is the bufferbloat.

Throughput of each flow

Data delivered per second (200 ms average). The dashed line is the link speed.

Congestion window

Packets each sender allows in flight. Above the bandwidth × delay line the extra packets sit in the buffer; at "BDP + buffer" the buffer overflows.

Three things to try

  1. Watch the tank fill. The default home router has a 1,000-packet buffer on a 20 Mbps link. CUBIC fills it within a few seconds and the ping climbs from 30 ms to over 600 ms at the peaks, then saws up and down as CUBIC backs off and creeps up again – grade F, although the link is 100 % used.
  2. Turn on SQM. Switch the router queue to FQ-CoDel (or pick "SQM on"). The throughput barely changes (97 % of the link instead of 100 %), but the buffer stays almost empty and the ping stays at the idle 30 ms: grade A+. The table next to the 3D view shows the same for every algorithm.
  3. Add loss, then a rival. Pick the Wi-Fi scenario: 1 % random loss halves CUBIC again and again and it uses a small part of the link, while BBR – which ignores loss – fills it. Then go back to the home router and add a BBR flow 2 next to CUBIC: watch who gets the bandwidth.

Model assumptions – what this model leaves out

  • One bottleneck, one direction. All flows share one link of fixed speed; the rest of the path only adds the idle round-trip time. ACKs never queue, there is no cross traffic in the other direction and no Wi-Fi airtime contention or link-layer retries.
  • Simplified TCP. 1,500-byte packets, an ACK for every packet, unlimited data to send. A loss is noticed when a packet sent three later is acknowledged (like SACK), with one window cut per round trip and a retransmission timeout as backup. CUBIC follows RFC 9438 without HyStart; BBR is version 1 (2016) – today's BBRv3 reacts to loss and shares more fairly.
  • Simplified queues. CoDel follows RFC 8289 with its 5 ms target and 100 ms interval; FQ-CoDel is one CoDel queue per flow served in turn, without the byte quantum, ECN marking or the sparse-flow list of RFC 8290 (the ping is given sparse-flow priority directly). No CAKE, PIE or ECN.
  • Grades describe this simulated link. The bands (A+ under 5 ms added, A under 30, B under 60, C under 200, D under 400, F above) are the same kind online bufferbloat tests use, but this page does not measure your connection – run such a test for that.

How the Bufferbloat Simulator – TCP CUBIC vs BBR, CoDel & FQ-CoDel in 3D works

The simulator follows every 1,500-byte packet. Senders put packets into the router queue, the bottleneck link sends one at a time at its speed, and the acknowledgement returns after the idle round-trip time. If the buffer is full the packet is dropped; a sender notices a loss when a packet sent three later is acknowledged, cuts its window at most once per round trip and falls back to a retransmission timeout if nothing comes back.

Reno adds one packet per round trip and halves on loss. CUBIC (RFC 9438) grows along W(t) = C·(t − K)³ + Wmax and multiplies by 0.7 on loss. BBR v1 measures the delivery rate (maximum over 10 round trips) and the minimum RTT (over 10 s), paces at gain × rate and keeps 2 × BDP in flight, cycling 1.25 / 0.75 / 1 to probe. CoDel drops packets that waited more than 5 ms for 100 ms; FQ-CoDel gives each flow its own CoDel queue served in turn.

A small ping sent through the same router waits behind everything already queued, so its round-trip time is the idle RTT plus the queue. The grade compares the average ping under load with the idle ping.

Bandwidth-delay product BDP = rate × idle RTT ÷ (1,500 × 8 bits)

Full-buffer wait = buffer packets × 1,500 × 8 ÷ rate

CUBIC: W(t) = C·(t − K)³ + Wmax, K = ∛(Wmax·(1 − β)/C), C = 0.4, β = 0.7

Reno under random loss p (Mathis 1997): rate ≈ (MSS / RTT) · √(3/2) / √p

Worked example

Home router: 20 Mbps upload, 30 ms idle ping, 1,000-packet drop-tail buffer, one CUBIC upload.

  1. BDP = 20,000,000 × 0.030 ÷ 12,000 = 50 packets. The buffer is 20 times larger: 1,000 × 12,000 ÷ 20,000,000 = 0.6 s of waiting when full.
  2. CUBIC keeps growing until the buffer overflows, so the queue stays mostly full: the ping under load averages 556 ms (+525 ms, grade F) at 100 % link use.
  3. With FQ-CoDel the same upload runs at 97 % of the link, while the ping stays at 31 ms (+0.6 ms, grade A+).

Result: The buffer, not the link speed, causes the lag: managing the queue cuts the added latency from about 525 ms to under 1 ms.

Assumptions and limits

  • One bottleneck in one direction, an ACK per packet, unlimited data, no ECN, no Wi-Fi airtime effects. CUBIC without HyStart; BBR is version 1. FQ-CoDel is simplified (no byte quantum or sparse-flow list; the ping gets sparse-flow priority directly). This page simulates a link – it does not measure your connection.
  • Checked: Reno with periodic loss vs Mathis 4.62 / 4.64 Mbps (p = 0.001, RTT 100 ms) and 1.48 / 1.47 Mbps (p = 0.01); random loss gives about 10 % more (5.14 and 1.62); CUBIC with periodic loss 1e−4 21.8 vs RFC 9438 response function 22.5 Mbps; Reno link use with a buffer of 0.05 / 0.25 BDP 0.787 / 0.895 vs sawtooth theory 0.785 / 0.887 and 1.000 at 1 BDP; full 1,000-packet buffer at 10 Mbps 1,222 ms vs 1,200 ms; CUBIC K for Wmax 100 = 4.217 s; CUBIC + BBR under FQ-CoDel 25.5 / 25.6 Mbps (Jain 1.000).

Sources

Last reviewed November 8, 2026 · How we build and check our calculators

Frequently Asked Questions About Bufferbloat

What is bufferbloat?

Bufferbloat is the lag you get when a router or modem holds far more packets than it needs. Loss-based TCP (Reno, CUBIC) keeps sending faster until a packet is dropped, so it fills whatever buffer there is. A 1,000-packet buffer on a 20 Mbps upload holds 0.6 seconds of data, and every ping, game packet or voice packet has to wait behind it.

How do I fix bufferbloat?

Turn on smart queue management (SQM) – usually FQ-CoDel or CAKE – on your router, and set its shaper a little below your real upload and download speed so the queue forms in the router, where it is managed, and not in the modem. FQ-CoDel drops or marks packets once they have waited more than 5 ms and gives sparse traffic such as games and calls its own queue, so their latency stays near the idle ping.

Is BBR better than CUBIC?

BBR measures the bottleneck rate and the minimum round-trip time and paces packets at that rate, so on its own it keeps buffers almost empty and shrugs off random loss (Wi-Fi, long links) that cripples CUBIC. But BBR v1 ignores loss: on shallow buffers it can cause heavy loss, and sharing a deep buffer with CUBIC it often takes more than its share. Neither fixes bufferbloat caused by other flows – a managed queue (FQ-CoDel) does.

What is a good bufferbloat grade?

The grade is the extra latency under load. Under 5 ms (A+) and under 30 ms (A) you will not notice it; up to 60 ms (B) is fine for most things; 60–200 ms (C) makes games and video calls lag; above 200 ms (D, F) calls break up and web pages feel slow while someone uploads or downloads.

Browse all 39 3d visualizers & ai tools calculators →

Copied!