Alexander Leidinger

Just another weblog

Jan
10

AQM/ECN in FreeBSD

After read­ing Jim Get­tys inves­ti­ga­tions about the prob­lems cur­rent buffer sizes of net­work equip­ment pro­voke (which may even have impli­ca­tions in the net neu­tral­ity debate), I had a look at which active queue man­age­ment (AQM) algo­rithms with or with­out explicit con­ges­tion noti­fi­ca­tion (ECN) FreeBSD supports.

It looks like there is not much imple­mented (if the best solu­tion would be imple­mented, it would not mat­ter how much there is, but unfor­tu­nately there is no best solu­tion). Other sys­tems offer more. RED is imple­mented, but even the inventor/researcher of RED thinks the algo­rithm needs some improve­ments (he is in the process of prepar­ing a paper about this, as Jim Get­tys reveals). Blue/SFBlue is not imple­mented (a more turnkey-solution than the cur­rent RED imple­men­ta­tion). PID con­troller (which may or may not be some­thing some­one wants to use in this case… no idea about its pros/cons in this regard, but it is ref­er­enced in the AQM arti­cle on Wikipedia) is also not implemented.

Regard­ing ECN for FreeBSD you can find more or less no real doc­u­men­ta­tion in the net (at least with a sim­ple “ECN FreeBSD” search). It is imple­mented for the RED algo­rithm, but as the RED algo­rithm needs some tuning/setup, this is not a turnkey solu­tion. There is a ECN related sysctl, but I do not have the impres­sion that this is a turnkey-solution which mag­i­cally gen­er­ates ECN mes­sages with­out using dum­mynet for AQM.

From my cur­rent under­stand­ing (but I think I do not know a lot about this topic) it looks like AQM is a fea­ture most peo­ple would like to have acti­vated by default (with an appro­pri­ate algo­rithm which does not need tun­ing to pro­duce a good enough result). If this is cor­rect, it is a shame that FreeBSD does not acti­vate AQM with an algo­rithm which is not bad for most cases by default (with the option to change the algo­rithm and to dis­able com­pletely). If my under­stand­ing is not cor­rect, I would like to get a hit with the clue bat please.

GD Star Rat­ing
load­ing…
GD Star Rat­ing
load­ing…

Tags: , , , , , , , , ,

6 Responses to “AQM/ECN in FreeBSD”

  1. Ermal Says:

    Altq has imple­men­ta­tion of these AQM.
    But the issue is still the same it does not play well with multiqueue.

    GD Star Rating
    loading...
    GD Star Rating
    loading...
  2. Rui Paulo Says:

    You are con­fus­ing router ECN with host ECN. Host ECN is what I imple­mented and it works fine. Router ECN is avail­able with RED on ALTQ.

    GD Star Rating
    loading...
    GD Star Rating
    loading...
  3. netchild Says:

    So the sysctl is host ECN, and the altq part is router ECN? If yes, what pre­vents us from enabling host ECN by default (what are the draw­backs), either by switch­ing the sysctl or via a rc.conf set­ting? I am aware that no rc.conf sup­port exists yet, but IMO this would be easy to write.

    What is the dif­fer­ence between host ECN and router ECN? For me (with just the Wikipedia-knowledge about ECN) it looks like in both cases a sys­tem should look if any buffer involved passed a spe­cific fill-level and then send a ECN mes­sage. I can under­stand that dif­fer­ent AQM algo­rithms may want to mod­ify the ECN trig­ger level/behavior, so it is maybe a lit­tle bit more com­pli­cated, but from a big pic­ture view I assume this is what is hap­pen­ing and I do not see a dif­fer­ence between host and router behavior.

    Can someome please shed some light on it. An URL would be sufficient.

    GD Star Rating
    loading...
    GD Star Rating
    loading...
  4. Rui Paulo Says:

    The router only marks the ECN pack­ets
    The hosts setup ECN between them­selves and they are respon­si­ble for throt­tling the tcp win­dow down when they see marked pack­ets.
    No one turns ECN by default because mid­dle­boxes don’t under­stand the new option and will reject ECN packets.

    GD Star Rating
    loading...
    GD Star Rating
    loading...
  5. netchild Says:

    What is the impact of rejected ECN packets?

    GD Star Rating
    loading...
    GD Star Rating
    loading...
  6. Rui Paulo Says:

    Con­nec­tions take longer to estab­lish because the mid­dle boxes will drop ECN SYN pack­ets. On FreeBSD we stop using ECN after the third SYN retrans­mis­sion, but if we are load­ing a web­page with 100 images it will take a lot longer.

    GD Star Rating
    loading...
    GD Star Rating
    loading...

Leave a Reply