General list for discussing Bufferbloat
 help / color / mirror / Atom feed
From: Joerg Deutschmann <joerg.deutschmann@fau.de>
To: Stephen Hemminger <stephen@networkplumber.org>,
	Maximilian Bachl <maximilian.bachl@gmail.com>,
	Maximilian Bachl via Bloat <bloat@lists.bufferbloat.net>
Subject: Re: [Bloat] The NetEm qdisc does not work in conjunction with other qdiscs
Date: Sat, 26 Oct 2024 00:47:44 +0200	[thread overview]
Message-ID: <fe545651-8e72-40fb-bc7b-51e9d09914e1@fau.de> (raw)
In-Reply-To: <20241025140230.5b1263b8@hermes.local>

[-- Attachment #1: Type: text/plain, Size: 1871 bytes --]

Thanks Max and Stephen,

>>  From my experience (experimented with it last year), it still behaves
>> weirdly. You can use htb for the shaping and you can create delay using
>> netem by using it on another (virtual) host on a link that does not have
>> any other qdiscs and where the link is not the bottleneck.
Yes, I did some quick tests and saw that this works:
> sudo tc qdisc add dev eth0 root handle 2: tbf rate 200Mbit burst 4542 limit 500000
> sudo tc qdisc add dev eth0 parent 2: handle 3: fq_codel
but this does not work:
> sudo tc qdisc add dev eth0 root handle 1: netem delay 20ms limit 10000000
> sudo tc qdisc add dev eth0 parent 1: handle 2: tbf rate 200Mbit burst 4542 limit 500000
> sudo tc qdisc add dev eth0 parent 2: handle 3: fq_codel

Adding netem delay to a separate host or adding it to the ingress qdisc 
(as described by Dave) does the trick.


> Yes, netem has expectations about how inner qdisc behaves,
> and other qdisc used as inner have expectations about how/when packets
> are sent. There is a mismatch, not sure if it is fixable with in the
> architecture of how Linux queue disciplines operate.
For the sake of completeness, here's the quote from the netem man page:
> Combining netem with other qdisc is possible but may not always work because netem use skb control block to set delays.
:-)

> 
> The best way is to use netem on an intermediate hop and not expect
> it to work perfectly when used on an endpoint. The same is true of Dummynet
> and other network emulators; they are uses as man-in-the-middle systems.
Still I guess it can be tricky if netem delay + tbf shaping + fq_codel 
shall be used altogether.

This paper mentions that the order tbf/netem or netem/tbf matters 
(section 4.1.1), but does not mention fq_codel:
https://atlas.cs.uni-tuebingen.de/~menth/papers/Menth17-Sub-2.pdf

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4843 bytes --]

  reply	other threads:[~2024-10-25 22:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-15 12:24 [Bloat] Testbed using containers O. P.
2024-10-25 18:54 ` [Bloat] The NetEm qdisc does not work in conjunction with other qdiscs Joerg Deutschmann
2024-10-25 19:41   ` Dave Taht
2024-10-25 22:33     ` Joerg Deutschmann
2024-10-25 19:55   ` Maximilian Bachl
2024-10-25 21:02     ` Stephen Hemminger
2024-10-25 22:47       ` Joerg Deutschmann [this message]
2024-10-25 23:12         ` Dave Taht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.bufferbloat.net/postorius/lists/bloat.lists.bufferbloat.net/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fe545651-8e72-40fb-bc7b-51e9d09914e1@fau.de \
    --to=joerg.deutschmann@fau.de \
    --cc=bloat@lists.bufferbloat.net \
    --cc=maximilian.bachl@gmail.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox