From: Jonathan Morton <chromatix99@gmail.com>
To: Jose Blanquicet <blanquicet@gmail.com>
Cc: bloat@lists.bufferbloat.net, marco maniezzo <marco.maniezzo@gmail.com>
Subject: Re: [Bloat] CPU consumption using TC-TBF and TC-POLICE to limit rate
Date: Tue, 26 May 2020 15:50:18 +0300 [thread overview]
Message-ID: <6E9DF291-4DD8-46D5-A6E0-E7917EDCD4B3@gmail.com> (raw)
In-Reply-To: <CAFC8iJL-yJqbfOvJwqnP2AxP8DnyQvF_-DaOngV-fwhcdCdLRA@mail.gmail.com>
> On 26 May, 2020, at 12:47 pm, Jose Blanquicet <blanquicet@gmail.com> wrote:
>
> We have an embedded system with limited CPU resources that acts as
> gateway to provide Internet access from LTE to a private Wi-Fi
> network. Our problem is that the bandwidth on LTE and Wi-Fi links is
> higher than what the system is able to handle thus it reaches 100% of
> CPU load when we perform a simple speed test from a device connected
> to our Wi-Fi Hotspot.
>
> Therefore, we want to limit the bandwidth to avoid system gets
> saturated is such use-case. To do so, we thought to use the QDISC-TBF
> on the Wi-Fi interface. For instance, to have 10Mbps:
>
> tc qdisc add dev wlan0 root tbf rate 10mbit burst 12500b latency 50ms
>
> It worked correctly and maximum rate was limited to 10Mbps. However,
> we noticed that the CPU load added by the TBF was not negligible for
> our system.
Just how limited is the CPU on this device? I have successfully shaped at several tens of Mbps on a Pentium-MMX, where the limiting factor may have been the PCI bus rather than the CPU itself.
Assuming your CPU is of that order of capability, I would suggest installing Cake using the out-of-tree build process, and the latest stable version of the iproute2 tools to configure it. Start with:
git clone https://github.com/dtaht/sch_cake.git
This provides a more efficient and more effective shaper than TBF, and a more effective AQM than a policer, and good flow-isolation properties, all in a single bundle that will be more efficient than running two separate components.
Once installed, the following should set it up nicely for you:
tc qdisc replace dev wlan0 root cake bandwidth 10Mbit besteffort flows ack-filter
Cake is considered quite a heavyweight solution, but very effective. If it doesn't work well for this particular use case, it may be feasible to backport some more recent work which takes a simpler approach, though along similar lines.
- Jonathan Morton
next prev parent reply other threads:[~2020-05-26 12:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-26 9:47 Jose Blanquicet
2020-05-26 12:04 ` Y
2020-05-26 12:50 ` Jonathan Morton [this message]
2020-05-26 14:42 ` Jose Blanquicet
[not found] ` <mailman.433.1590494678.24343.bloat@lists.bufferbloat.net>
2020-05-26 14:50 ` Jose Blanquicet
2020-05-26 15:01 ` Y
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=6E9DF291-4DD8-46D5-A6E0-E7917EDCD4B3@gmail.com \
--to=chromatix99@gmail.com \
--cc=blanquicet@gmail.com \
--cc=bloat@lists.bufferbloat.net \
--cc=marco.maniezzo@gmail.com \
/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