←back to thread

360 points pjf | 2 comments | | HN request time: 0.653s | source
Show context
notacoward ◴[] No.14299101[source]
It's almost irresponsible to write an article on this topic in 2017 without explicitly mentioning bufferbloat or network-scheduling algorithms like CoDel designed to address it. If you really want to understand this article, read up on those first.

https://en.wikipedia.org/wiki/CoDel

replies(5): >>14299422 #>>14299475 #>>14299613 #>>14301482 #>>14304236 #
throwasehasdwi ◴[] No.14299422[source]
CoDel is different from the packet scheduling algorithm even though both fight bufferbloat in different ways. CoDel is a congestion control algorithm for controlling what happens when outgoing buffers start overflowing. This is on a lower level than TCP and happens to any type of packet. The scheduling algorithm, like VEGAS or BBR, controls the transmit rate of only the TCP protocol.

When packets are being sent over the wires, the TCP scheduling algorithm (usually CUBIC, VEGAS, RENO, or now BBR) will send out packets until the parameters they monitor indicate the downstream device is about to overload. Then they will back off slightly to prevent packets from being lost. These TCP transmit strategies tend to either monitor packet loss rate or round trip time, sometimes both. What they do with these two parameters determines the biggest differences between the packet sending algorithms.

CODEL comes into affect when the scheduling algorithm decides it can't send out packets quickly enough without losing them, and they build up on local buffers. This can happen with TCP but also other internet protocols.

Something most people don't know is that without a scheduling algorithm like BBR,VEGAS, or RENO, you can send out packets at interface speed. In simpler protocols like UDP you need to do your own packet scheduling. Otherwise your machine will send out packets at interface speed until they are mostly dropped by the first slower link. This is why TCP has scheduling algorithms, they're all an attempt to monitoring the end to end link speed from A to B you can achieve without losing data.

Edit: BBR is a new TCP scheduling algorithm to fight buffer-bloat at the TCP level. Since the majority of internet traffic is TCP, wide adoption would cause a big improvement. TCP scheduling only affects outgoing packets, so its important to get this into Windows and Linux so we can get the full benefit of having buffer-bloat reduction on both ends. I'm looking at MS here because they're the last major OS running an aggressive and buffer-bloat causing TCP algorithm.

replies(4): >>14299445 #>>14299669 #>>14303111 #>>14310578 #
kev009 ◴[] No.14303111[source]
Your terminology seems a bit strange to me, the way I've seen these discussed:

CoDel is an AQM (Active Queue Management) algorithm - it decides what packets to drop and when to drop them as a packet queue fills. This is most relevant at the hop with a bottle neck link.

BBR and reno etc are TCP congestion control algorithms or less frequently called congestion avoidance algorithms - they manipulate the window size and attempt to avoid congestion using different takes on congestion signaling (i.e.loss based reno, delay based for vegas, model based for bbr). This is most relevant from the sender side.

Scheduling would be more advanced queuing disciplines (for QoS or flow based fair queuing) and packet pacers. Queuing disciplines can apply to any bottle neck link, pacing is most useful sender side.

replies(1): >>14310231 #
throwasehasdwi ◴[] No.14310231[source]
CoDel is packet scheduling. It just dynamically creates "classes" for each flow to determine which ones are overfilling the buckets and selectively drops from those streams.

I try to talk about these things in a way that's easy for lay people to understand. Even among programmers QoS and packet scheduling are a niche topic

replies(1): >>14311351 #
1. _av8l ◴[] No.14311351[source]
CoDel is just an AQM: https://tools.ietf.org/html/draft-ietf-aqm-codel-07 What you describe is called FQ-CoDel: https://tools.ietf.org/html/draft-ietf-aqm-fq-codel-06
replies(1): >>14342863 #
2. throwasehasdwi ◴[] No.14342863[source]
right you are! My apologies, my familiarly with CoDel is limited to the Linux implementation