tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CoDel and FQ-CoDel for ALTQ
Hi,
I'm Abdul Wasey, a student at NITK Surathkal working with Prof. Mohit P.
Tahiliani. I'd like to work on AQM for NetBSD, starting from Emmanuel's
GSoC 2024 CoDel work for ALTQ, and wanted to check the plan here first.
I forward-ported Emmanuel's altq_codel branch to -current and tested it
on a NetBSD router with a 10 Mbit/s bottleneck, 4 TCP flows and a UDP
probe for the delay. As in the current state, CoDel does not drop the
packets; the byte count of the class queue it checks is not getting
updated, so it behaves like the FIFO. I fixed that and a few other
issues that I noticed, among them there was a panic in altqstat for HFSC
and PRIQ classes, PRIQ CoDel classes that can't be created, the MAKEDEV
minors after wfq being shifted, and the enqueue timestamp overwriting
pf's ALTQ tag.
I also ported OpenBSD's fq_codel as an ALTQ discipline ("interface
vioif2 bandwidth 10M fqcodel"). Median / p99 delay of the probe, with
the token bucket fix below:
no added RTT 40 ms base RTT
FIFO (PRIQ) 221 / 241 ms 269 / 280 ms
CoDel (PRIQ) 0.2 / 11.4 ms 40.2 / 43.0 ms
FQ-CoDel 0.3 / 0.3 ms 40.3 / 44.4 ms
With 8 TCP flows and a 50 Mbit/s UDP flood on the same link, FQ-CoDel
keeps 8.4 Mbit/s for TCP and the flood gets 1.1. With FIFO or CoDel the
flood takes 8.6 to 9.7.
I found two altqd bugs on the way, which I'll send as PRs:
- The default token bucket ignores HZ, so with HZ=100 a 10M interface is
shaped to about 6 Mbit/s and a 50M one to about 12.
- altqd spins at 100% CPU on SIGTERM when a conditioner is configured
(PR bin/60934, kern/57171). It's an inverted condition in qop_clear().
What I'd like to do, in this order:
1. The two altqd fixes above: the token bucket and the SIGTERM spin.
2. CoDel: Emmanuel's commits with my fixes on top, with the man page and
ATF tests.
3. FQ-CoDel as its own discipline.
4. Then PIE and FQ-PIE, and ECN marking.
Emmanuel mentioned making ALTQ modular as the first step, and when he
proposed FQ-CoDel here last year there was a request to keep the
disciplines pluggable. Should the CoDel work wait for that, or can it go
in on the current structure and move with the rest? And is ALTQ still
the right place for this, or should new queueing go towards NPF?
The patches are against HEAD from 2026-11-04 and build.sh release
passes. I can post them here or put them on a branch, whichever is
easier to review.
Thanks,
Abdul Wasey
Home |
Main Index |
Thread Index |
Old Index