Buffer Size Calculator
Size switch or router buffers using the BDP rule or the Stanford BDP over root-N rule for many flows.
Inputs
Recommended Buffer
4 MiB
Full BDP Rule
36 MiB
BDP ÷ √N Rule
4 MiB
Buffer Drain Time
3.00ms
Recommended Buffer
3.58MB
Step by step
Values used
Link speed = 10 Gbit/s; Round-trip time = 30 ms; Concurrent long-lived TCP flows = 100 flows; Use the BDP ÷ √N rule = Yes
Buffer Size
buffer = BDP for a single flow, or BDP ÷ √N when N long-lived flows share the link.
Recommended Buffer
= 3,750,000
Full BDP Rule
= 37,500,000
BDP ÷ √N Rule
= 3,750,000
Buffer Drain Time
= 3.00 ms
Recommended Buffer
= 3.58 MB
How it works
One flow needs a full BDP of buffer to keep the link busy through its sawtooth. With many independent flows the sawtooths desynchronise and their aggregate is far smoother, so the buffer requirement falls by the square root of the flow count. This is why datacentre switches ship with shallow buffers and still run at line rate: with hundreds of flows per port, buffer memory sized to a full BDP would only add latency.
Formula
Buffer Size
buffer = BDP for a single flow, or BDP ÷ √N when N long-lived flows share the link.
- BDP
- Bandwidth × RTT ÷ 8, in bytes
- N
- Number of concurrent long-lived TCP flows
- √N
- Desynchronisation factor from the Stanford buffer-sizing result
Frequently Asked Questions
How is Buffer Size calculated?
buffer = BDP for a single flow, or BDP ÷ √N when N long-lived flows share the link. One flow needs a full BDP of buffer to keep the link busy through its sawtooth. With many independent flows the sawtooths desynchronise and their aggregate is far smoother, so the buffer requirement falls by the square root of the flow count.
Why does Buffer Size matter?
This is why datacentre switches ship with shallow buffers and still run at line rate: with hundreds of flows per port, buffer memory sized to a full BDP would only add latency.
What values do I need to enter?
This calculator takes 4 inputs: Link speed, Round-trip time, Concurrent long-lived TCP flows, Use the BDP ÷ √N rule. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
When should I use the full BDP rule instead?
Use the full BDP when a small number of high-rate flows dominate the link — bulk replication, backup windows or a single large file transfer. The √N reduction relies on many independent flows whose congestion cycles do not line up.