TCP Bandwidth-Delay Product (BDP) & RFC 7323 Window Scaling: Tuning Linux BBR sysctl for Long-Fat Networks
Engineers frequently provision a 1 Gbps or 10 Gbps cross-region cloud interconnectβsay Frankfurt to Virginia at 85 ms RTTβrun an iperf3 single-stream test, and stare in disbelief as throughput plateaus at a fraction of line rate. The culprit is rarely the NIC or fiber path: it is an undersized TCP socket buffer capping in-flight data below the link's Bandwidth-Delay Product (BDP).
1. The Physics of BDP: How Many Bytes Must Be In Flight Simultaneously
TCP is a reliable sliding-window protocol: a sender can transmit at most one Receive Window (rwnd) or Congestion Window (cwnd) of unacknowledged data before pausing to wait for an ACK from the receiver. To keep a high-bandwidth, high-latency pipe ('Long Fat Network', or LFN) completely full, the amount of unacknowledged data in flight must equal or exceed the Bandwidth-Delay Product: BDP (bytes) = Bandwidth (bits/s) x RTT (seconds) / 8.
Look at what happens with the legacy 16-bit TCP header window ceiling of 65,535 bytes on an 85 ms transatlantic link: 65,535 bytes x 8 bits / 0.085 s = 6.17 Mbps maximumβeven on a 10 Gbps circuit! RFC 7323 TCP Window Scaling solves this by negotiating a bit-shift factor (0 to 14) during the SYN handshake, expanding the maximum window up to 1 GiB.
| Link Speed | Round-Trip Time (RTT) | Exact BDP | Min Window Scale Shift | Recommended 2x Max Buffer |
|---|---|---|---|---|
| 100 Mbps | 40 ms (Regional) | 500 KB | 3 (max 512 KB) | 1 MiB (1,048,576 B) |
| 1 Gbps | 85 ms (US-EU) | 10.63 MB | 8 (max 16.7 MB) | 22β32 MiB (33,554,432 B) |
| 1 Gbps | 180 ms (US-APAC) | 22.50 MB | 9 (max 33.5 MB) | 48β64 MiB (67,108,864 B) |
| 10 Gbps | 30 ms (Cross-US) | 37.50 MB | 10 (max 67.1 MB) | 75β128 MiB (134,217,728 B) |
| 10 Gbps | 85 ms (US-EU) | 106.25 MB | 11 (max 134.2 MB) | 216β256 MiB (268,435,456 B) |
2. Why Loss-Based CUBIC Collapses Under Even 0.05% Packet Loss
Even after sizing socket buffers to 2x BDP, classic loss-based congestion control algorithms (like Reno or CUBIC) interpret every single dropped packet as catastrophic congestion and slash the congestion window sharply. By the classic Mathis upper boundβThroughput <= (MSS / RTT) x (C / sqrt(loss))βa tiny 0.05% random packet loss on an 85 ms link caps single-stream loss-based TCP around ~7.5 Mbps regardless of buffer size.
Enabling Google's Bottleneck Bandwidth and Round-trip propagation time (BBR) congestion control paired with the Fair Queueing (fq) packet scheduler models actual delivery rate and minimum RTT rather than reacting blindly to isolated random drops, frequently delivering 3xβ10x higher single-stream WAN throughput over lossy internet paths.
3. Production Linux sysctl Profile for High-BDP WAN Links
D
e
f
a
u
l
t
L
i
n
u
x
t
c
p
_
r
m
e
m
a
n
d
t
c
p
_
w
m
e
m
c
e
i
l
i
n
g
s
(
t
y
p
i
c
a
l
l
y
4
β
6
M
B
o
n
o
l
d
e
r
i
m
a
g
e
s
)
s
i
l
e
n
t
l
y
t
h
r
o
t
t
l
e
1
G
b
p
s
+
c
r
o
s
s
-
o
c
e
a
n
t
r
a
n
s
f
e
r
s
.
S
e
t
t
i
n
g
a
c
o
n
s
e
r
v
a
t
i
v
e
d
e
f
a
u
l
t
(
1
2
8
K
B
)
w
h
i
l
e
r
a
i
s
i
n
g
o
n
l
y
t
h
e
a
u
t
o
-
t
u
n
i
n
g
m
a
x
i
m
u
m
t
o
~
2
x
B
D
P
(
f
o
r
e
x
a
m
p
l
e
,
3
2
M
i
B
f
o
r
1
G
b
p
s
@
8
5
β
1
2
0
m
s
)
l
e
t
s
t
h
e
k
e
r
n
e
l
a
l
l
o
c
a
t
e
e
x
t
r
a
m
e
m
o
r
y
s
t
r
i
c
t
l
y
f
o
r
f
a
s
t
l
o
n
g
-
d
i
s
t
a
n
c
e
f
l
o
w
s
w
i
t
h
o
u
t
w
a
s
t
i
n
g
R
A
M
o
n
i
d
l
e
s
o
c
k
e
t
s
.
# /etc/sysctl.d/99-netdevkit-wan-bbr.conf (1 Gbps @ ~85-120 ms RTT)
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr
net.ipv4.tcp_window_scaling = 1
# Raise socket buffer ceilings (32 MiB = 33554432 bytes)
net.core.rmem_max = 33554432
net.core.wmem_max = 33554432
net.ipv4.tcp_rmem = 4096 131072 33554432
net.ipv4.tcp_wmem = 4096 131072 33554432
# Apply without reboot and verify active BBR
sysctl --system
sysctl net.ipv4.tcp_congestion_control net.core.default_qdisc
4. Testing Your Tuning Properly with iperf3
V
e
r
i
f
y
s
i
n
g
l
e
-
s
t
r
e
a
m
t
h
r
o
u
g
h
p
u
t
b
e
f
o
r
e
a
n
d
a
f
t
e
r
a
p
p
l
y
i
n
g
s
y
s
c
t
l
t
u
n
i
n
g
u
s
i
n
g
'
i
p
e
r
f
3
-
c
<
h
o
s
t
>
-
t
1
5
'
a
n
d
c
h
e
c
k
t
h
e
R
e
t
r
(
r
e
t
r
a
n
s
m
i
t
s
)
c
o
l
u
m
n
a
l
o
n
g
s
i
d
e
'
s
s
-
t
i
'
t
o
i
n
s
p
e
c
t
t
h
e
l
i
v
e
c
w
n
d
,
r
t
t
,
a
n
d
w
s
c
a
l
e
n
e
g
o
t
i
a
t
e
d
o
n
t
h
e
s
o
c
k
e
t
.
I
f
w
s
c
a
l
e
s
h
o
w
s
0
,
a
n
i
n
t
e
r
m
e
d
i
a
t
e
s
t
a
t
e
f
u
l
f
i
r
e
w
a
l
l
o
r
l
e
g
a
c
y
a
p
p
l
i
a
n
c
e
i
s
s
t
r
i
p
p
i
n
g
R
F
C
7
3
2
3
T
C
P
o
p
t
i
o
n
s
f
r
o
m
S
Y
N
p
a
c
k
e
t
s
.