Skip to content

Bad restriction: RCV Buffer <= Flow control window #700

Description

@maxsharabayko

SRT has a restriction that the receiver buffer must not be greater than FC size:
if (m_iRcvBufSize > m_iFlightFlagSize) { m_iRcvBufSize = m_iFlightFlagSize; }

At the same time, the TSBPD algorithm buffers received packets in the receiver’s buffer until it is time to deliver them further.
So the condition does not make sense.
It should rather be like:
Rcv_buf >= fc_window*packet_size + (latency*bitrate)

The number of packet in flight is also controlled by the available space in the receiver buffer, reported back by the receiver.
On top of that, File CC controls the congestion window.
So for file mode this probably does not hurt much, but still does not look reasonable.

Buffer Sizes Configuration

Default receiver buffer size is 8192 × (1500-28) = 12058624 bytes or approximately 96 Mbits.
Default flow control window size is 25600 packets or approximately 300 Mbits.

The target number of packets in flight (FC window) should be (assuming max payload size):
FC = bps × RTTsec / 8 / (1500 - 28).
For example for 1,5 Gbps link with 150 ms RTT:
FC = 1500 × 106 × 0.15 / 8 / (1472) = 19106 packets (or 225 Mbits).
For 2,0 Gbps link with 150 ms RTT:
FC = 2 × 109 × 0.15 / 8 / (1472) = 25475 packets (or 300 Mbits).

Metadata

Metadata

Assignees

Labels

Priority: LowType: BugIndicates an unexpected problem or unintended behavior[core]Area: Changes in SRT library core

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions