Table of Contents
sendQueueLimit
QUIC uses the parameter sendQueueLimit to limit the size of total data in the send queues of the streams. The send queue includes unsent data, sent but unacked data, and lost data. When we reach this limit, we notify the application that we are not able to accept any more data. If this happens, we wait until the size of total data in the send queues is down to (sendQueueLimit * sendQueueLowWaterRatio), before we notify the application that we are able to accept data again.
Saturated Sender
A saturated sender needs data, whenever it is ready to send. To avoid an application-limited situation, we have to choose a sendQueueLimit that is high enough. To simplify the calculation, we consider a sender with a single stream.
The approximately minimum of the send queue is
sendQueue_min = sendQueueLimit * sendQueueLowWaterRatio
Since the sendQueue contains besides data ready to send (unsent data and lost data), also sent but unacked data, we have to reduce the size of that data. To find the minimum of data ready to send over time (dataSizeToSend_min), we reduce sendQueue_min by the maximum size of sent but unacked data over time. That is, the maximum of the congestion window (cwnd_max). Therefore
dataSizeToSend_min = sendQueueLimit * sendQueueLowWaterRatio - cwnd_max
The dataSizeToSend_min should be greater than 0 to avoid an application-limited situation.
sendQueueLimit * sendQueueLowWaterRatio - cwnd_max > 0 <==> sendQueueLimit > cwnd_max/sendQueueLowWaterRatio
cwnd_max = BDP + RouterBuffer
BDP = BW * RTT RouterBuffer = frameCapacity * maxQuicPacketSize
where RouterBuffer stands for the buffer size of the node (probably a router) before the bottleneck link. maxQuicPacketSize is the MTU reduced by the IP header and UDP header size.
Example
For BW = 100 Mb/s, RTT = 20 ms, frameCapacity = 10, sendQueueLowWaterRatio = 0.4, maxQuicPacketSize = 1252 B (for MTU=1280 over IPv4)
RouterBuffer = 10 * 1252 B = 12520 B BDP = 100 Mb/s * 20 ms = 250000 B cwnd_max = BDP + RouterBuffer = 262520 B sendQueueLimit > cwnd_max/sendQueueLowWaterRation = 262520/0.4 = 656300 B
=⇒ For this example, set sendQueueLimit to a value greater than 656300 bytes.
esv comments:
I'm not sure that I understand what do you mean here:
> dataSizeToSend_min = sendQueueLimit * sendQueueLowWaterRatio - cwnd_max
I suggest to wright:
> sendQueueLimit * sendQueueLowWaterRatio >= cwnd_max
