General list for discussing Bufferbloat
 help / color / mirror / Atom feed
From: Jose Blanquicet <blanquicet@gmail.com>
To: Jonathan Morton <chromatix99@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 16:42:11 +0200	[thread overview]
Message-ID: <CAFC8iJK09Z5OjqQMx6wD_GaYN1XRHXvrH4u3m33Grrq8Lej=GA@mail.gmail.com> (raw)
In-Reply-To: <6E9DF291-4DD8-46D5-A6E0-E7917EDCD4B3@gmail.com>

Hi Jonathan,

Thanks for the response.

On Tue, May 26, 2020 at 2:50 PM Jonathan Morton <chromatix99@gmail.com> wrote:
> > 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.

We have just a percentage of an ARM Cortex A7 (1.2GHz) because the
rest is reserved for modem. We are now trying to optimize all the
applications in the system but LTE<->WIFI data transfer is indeed the
use-case that puts our system in crisis.

> 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.

Interesting, we will have a look at this and do some test to see how
it behaves in our "particular" environment.

Thanks,
Jose

  reply	other threads:[~2020-05-26 14:42 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
2020-05-26 14:42   ` Jose Blanquicet [this message]
     [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='CAFC8iJK09Z5OjqQMx6wD_GaYN1XRHXvrH4u3m33Grrq8Lej=GA@mail.gmail.com' \
    --to=blanquicet@gmail.com \
    --cc=bloat@lists.bufferbloat.net \
    --cc=chromatix99@gmail.com \
    --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