Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do we limit the pacing queue? #53

Open
maolson-msft opened this issue Feb 7, 2023 · 2 comments
Open

How do we limit the pacing queue? #53

maolson-msft opened this issue Feb 7, 2023 · 2 comments
Labels
TPTO Related to Time based Packet Transmission offloads

Comments

@maolson-msft
Copy link
Contributor

Half of all networking problems are caused by unbound queues.

Pacing introduces a new queue into the system. How will the size of this queue be limited?

@maolson-msft maolson-msft added the TPTO Related to Time based Packet Transmission offloads label Feb 7, 2023
@nibanks
Copy link
Member

nibanks commented Feb 8, 2023

In other words, what is the back pressure mechanism involved here? I've talked with @csujedihy on this topic and he had quite a few thoughts. A few of the available options we discussed:

Explicit Queue Size + Tracking

The NIC can indicate the queue size available for outstanding TPTO sends and the OS keeps track of how many currently queued items it has given to the NIC. If we reach a certain "high water mark" and risk running out of space then we indicate this back to the sender with a special "success but running out of space" status code that can then be used as a signal for congestion control to back off.

Explicit High-Water Mark Signal

Similar to above, but instead of the NIC indicating a queue size (which might not be possible or at least easy) the NIC would be the one to track the queue usage and indicate the status in the send completion for "high water mark".

ECN

The NIC could use ECN to mark the packets that are approaching the queue limit when it sends them out. Then, if the protocol supports ECN, it should respond appropriately.

This has the downside of requiring protocol level support as well as waiting a round trip before getting the signal. By then the queue might have already overflowed.

Packet Loss

In the absence of any explicit signal, the fallback is packet loss; essentially treating this as any other queue on the network.

Again, this requires protocol support for loss detection as well as a round trip to discuss the problem and will always result in data loss that must be recovered (retransmitted).

@nibanks nibanks changed the title TPTO: limit the pacing queue How do we limit the pacing queue? Feb 8, 2023
@csujedihy
Copy link

csujedihy commented Feb 8, 2023

After some further thinking on this and discussion with Matt yesterday, I think back-pressure mechanism is necessary only when we have a fixed pacing rate configured (e.g. HTB rate limiter and SO_MAX_PACING_RATE in linux). When I experiment pacing with a LWF pacer, most of the time I just set a fixed rate, which causes cwnd to grow unboundedly. If the pacing logic we are going to implement does something like setting pacing rate to cwnd/rtt, we likely won't have a large pacing queue. Though, I sort of expect a socket option for setting a fixed/max pacing rate will be the first feature request from our future customers after we release TCP/UDP/QUIC pacing.

That said, an unbounded queue is still a problem that needs to be addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TPTO Related to Time based Packet Transmission offloads
Projects
None yet
Development

No branches or pull requests

3 participants