Cake - FQ_codel the next generation
 help / color / mirror / Atom feed
From: Adrian Popescu <adriannnpopescu@gmail.com>
To: "Toke Høiland-Jørgensen" <toke@redhat.com>
Cc: Georgios Amanakis <gamanakis@gmail.com>,
	Cake List <cake@lists.bufferbloat.net>
Subject: Re: [Cake] profiling using perf
Date: Mon, 11 Mar 2019 16:49:37 +0200	[thread overview]
Message-ID: <CAF3M4P2WeHWPH+Ax8Eoy81t2mTEg1znPxK3R=Rzy4BpV+SX9tQ@mail.gmail.com> (raw)
In-Reply-To: <87wol83uio.fsf@toke.dk>

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

Hello,

On Sat, Mar 9, 2019 at 6:03 PM Toke Høiland-Jørgensen <toke@redhat.com>
wrote:

> Georgios Amanakis <gamanakis@gmail.com> writes:
>
> > Dear List,
> >
> > I made an effort to profile the performance of cake with perf in
> > openwrt. perf was run on a WRT1900ACS router while downloading
> > archlinux.iso via torrent in a LAN client. You can find the annotated
> > sch_cake.c in the attachment as well as a performance histogram of
> > sch_cake (percentages are relative to sch_cake). Hopefully people can
> > take a look at it, and see if there are performance concerns.
>
> Hmm, nothing immediately jumps out as low-hanging fruit to be harvested.
> It's not too surprising the 200+-line cake_dequeue() is where most time
> is spent, since that is where the bulk of the algorithm is implemented.
>

> And, well, there's nothing in there that can obviously be removed unless
> we want to drop features. I guess one could try to make it possible to
> disable features at compile time; but that carries quite a bit of
> complexity with it (for one, it needs testing with the combinatorial
> explosion of possible configurations), so don't think it's realistic.
> The only exception *might* be a compile time option to turn off those
> stats that are not needed for the algorithm to run...
>

The algorithm itself has probably been optimized over the years. It
might be a good idea to think of other ways to perform some
operations and simplify the algorithm. The code may not be that
slow on a high end CPU such as a Core i5 and anything faster.

The problem with the current implementation is that it's not able to
saturate a gigabit connection even on dual core ARM routers with
frequencies above 1.2 GHz. Routers for home users are probably going
to rely on hardware offloads to saturate gigabit connections for a
long time. This doesn't mean cake is poorly optimized or poorly
implemented. It's not a good fit for small embedded systems with small
CPU caches.

Different data structures might help improve performance.

This is why I've run a bunch of tests over the last few weeks. My
conclusion is that the current version of cake can't deal with more
than 100 mbps on ar71xx. mt7621 seems to go up to about 200 mbps.

I was thinking of a few things to try:
- disable some stats and profile
- lower the number of queues from 1024 to 256
- look into profiling to figure out what's causing cache misses
- disable some features and profile again
- set up a lab for all this testing

It's hard to find the time to do all of this. There's a lot to learn
in the process.


>
> -Toke
> _______________________________________________
> Cake mailing list
> Cake@lists.bufferbloat.net
> https://lists.bufferbloat.net/listinfo/cake
>

[-- Attachment #2: Type: text/html, Size: 3826 bytes --]

  reply	other threads:[~2019-03-11 14:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-08 20:58 Georgios Amanakis
2019-03-08 21:01 ` Georgios Amanakis
2019-03-09 16:03   ` Toke Høiland-Jørgensen
2019-03-11 14:49     ` Adrian Popescu [this message]
2019-03-11 15:53       ` Jonathan Morton

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/cake.lists.bufferbloat.net/

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

  git send-email \
    --in-reply-to='CAF3M4P2WeHWPH+Ax8Eoy81t2mTEg1znPxK3R=Rzy4BpV+SX9tQ@mail.gmail.com' \
    --to=adriannnpopescu@gmail.com \
    --cc=cake@lists.bufferbloat.net \
    --cc=gamanakis@gmail.com \
    --cc=toke@redhat.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