[Cake] profiling using perf

Toke Høiland-Jørgensen toke at redhat.com
Sat Mar 9 11:03:11 EST 2019


Georgios Amanakis <gamanakis at 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...

-Toke


More information about the Cake mailing list