From: Sebastian Moeller <moeller0@gmx.de>
To: Pete Heist <pete@heistp.net>
Cc: "Toke Høiland-Jørgensen" <toke@toke.dk>,
"Cake List" <cake@lists.bufferbloat.net>
Subject: Re: [Cake] Using cake to shape 1000’s of users.
Date: Mon, 30 Jul 2018 12:09:37 +0200 [thread overview]
Message-ID: <8893BD36-72A4-4FC8-A013-BBB97F0E879B@gmx.de> (raw)
In-Reply-To: <305C8083-A170-42E8-BC96-120D3B0065EA@heistp.net>
Hi Pete
> On Jul 30, 2018, at 11:14, Pete Heist <pete@heistp.net> wrote:
>
>
>> On Jul 29, 2018, at 9:14 PM, Toke Høiland-Jørgensen <toke@toke.dk> wrote:
>>>
>>> Caveats that I know of:
>>> - Limited to 1024 members
>>> - No fairness between flows
>>
>> You could assign more than one queue per customer and hash traffic
>> between them in BPF…
>
> True. There will always be that limit of 1024 (in my case I’ll need 800).
I believe all you needto do is change the following in scg_cake.c:
#define CAKE_QUEUES (1024)
Now I heard reports that above a certain number this breaks, but it might be enough for 32K or even 64k, or ~32 to 64 queues per customer, which might already help to spread out things a bit...
Best Regards
Sebastian
>
>>> - Non-member traffic would have to be dealt with somehow, maybe put in
>>> its own queue or split among multiple queues, otherwise there can be
>>> hash collisions with member queues
>>
>> Yeah, an "overflow queue" is definitely needed in this kind of
>> deployment :)
>
> Yep, I’d like to hash the non-member flows across the remaining queues.
>
>> I actually wrote an eBPF classifier a few months back, that can lookup
>> subnets in a BPF map and map them into different classes:
>> https://github.com/tohojo/tc-classifier
>
> Nice! That along with Dave’s ack classifier will help me write one for MAC addresses. I got as far as “my first no-panic bpf”, but for starters I wasn’t sure of the right way to set classid, so I see TC_H_MAKE. The documentation one finds on BPF varies a lot in correctness, so I messed around a while.
>
> I think regardless of whether ISP cake is a new qdisc or changes to the current one, it would be good to provide a common tool like this for mapping both MACs and IP subnets. Maybe I can just expand tc-classifier a bit for my needs and try to think of others also? Here’s how it could work:
>
> Userspace tool:
> - accepts as input from stdin or file, space or comma separated mappings of one of (MAC address, IPv4 subnet or IPv6 subnet) to both classid (flow) and priority (tin), so three fields total
> - accepts as an optional argument tin to place unclassified traffic in (defaults to 0)
> - returns an error if no queues available for unclassified traffic
> - puts mappings into up to three global BPF maps (for MAC, IPv4 and IPv6)
> - puts unclassified traffic tin, if non-zero, into a global
> - should lock globals here so updates can be made without removing / re-adding qdisc
>
> BPF filter:
> - tries to classify first using MAC address map, then IPv4 or IPv6 maps for IP traffic
> - spreads any unclassified traffic in unclassified traffic tin across remaining classids from max(classid)+1 to 1023
>
> Lastly, although it's natural to use classid for flow (subscriber) and priority for tin, we have a hard maximum of 2^16 subscribers in a given tin (minor classid is 16 bits). It doesn’t matter now because we only have 1024 flows per tin, but for ISP cake, is a limit of ~2^16 subscribers in one tin enough? Otherwise we’d have to change the way we specify this.
>
> _______________________________________________
> Cake mailing list
> Cake@lists.bufferbloat.net
> https://lists.bufferbloat.net/listinfo/cake
next prev parent reply other threads:[~2018-07-30 10:09 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-17 7:24 Felix Resch
2018-07-17 16:59 ` Dave Taht
2018-07-26 15:46 ` Dan Siemon
2018-07-26 15:48 ` Dave Taht
2018-07-26 18:07 ` Dan Siemon
2018-07-28 15:51 ` Dave Taht
2018-07-28 16:11 ` Jonathan Morton
2018-07-28 16:36 ` Dave Taht
2018-07-26 17:42 ` Toke Høiland-Jørgensen
2018-07-26 18:10 ` Dan Siemon
2018-07-26 21:09 ` Toke Høiland-Jørgensen
2018-07-26 21:38 ` Jonathan Morton
2018-07-27 9:25 ` Pete Heist
2018-07-27 14:04 ` Dan Siemon
2018-07-27 18:58 ` Jonathan Morton
2018-07-28 8:56 ` Toke Høiland-Jørgensen
2018-07-28 15:04 ` Dave Taht
2018-07-28 16:19 ` Jonathan Morton
2018-07-28 16:39 ` Dave Taht
2018-07-28 17:01 ` Pete Heist
2018-07-28 17:37 ` Pete Heist
2018-07-28 17:52 ` Dave Taht
2018-07-28 17:56 ` Dave Taht
2018-07-28 18:12 ` Toke Høiland-Jørgensen
2018-07-29 0:17 ` Pete Heist
2018-07-29 19:14 ` Toke Høiland-Jørgensen
2018-07-30 9:14 ` Pete Heist
2018-07-30 10:09 ` Sebastian Moeller [this message]
2018-07-30 10:55 ` Toke Høiland-Jørgensen
2018-07-30 11:05 ` Pete Heist
2018-07-30 11:28 ` Toke Høiland-Jørgensen
2018-07-30 22:10 ` Pete Heist
2018-07-30 22:17 ` Toke Høiland-Jørgensen
2018-07-31 7:31 ` Jonathan Morton
2018-07-30 10:55 ` Pete Heist
2018-07-30 11:05 ` Jonathan Morton
2018-07-28 17:53 ` Jonathan Morton
2018-07-28 18:07 ` Dave Taht
2018-07-28 18:17 ` Toke Høiland-Jørgensen
2018-07-28 19:35 ` [Cake] 1000s " Dave Taht
2018-07-29 23:24 ` [Cake] Using cake to shape 1000’s " Dave Taht
2018-08-07 1:46 ` Dan Siemon
2018-07-28 7:18 ` Pete Heist
2018-07-28 8:06 ` Jonathan Morton
2018-07-28 16:41 ` Pete Heist
2018-07-28 17:32 ` [Cake] isp economics Dave Taht
2018-07-28 18:39 ` Pete Heist
2018-07-28 19:03 ` Dave Taht
2018-07-28 20:00 ` Pete Heist
2018-07-29 5:49 ` Loganaden Velvindron
2018-07-28 19:09 ` Dave Taht
-- strict thread matches above, loose matches on Subject: below --
2018-07-16 18:39 [Cake] Using cake to shape 1000’s of users Mike
2018-07-16 19:01 ` Jonathan Morton
2018-07-16 19:13 ` Michel Blais
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=8893BD36-72A4-4FC8-A013-BBB97F0E879B@gmx.de \
--to=moeller0@gmx.de \
--cc=cake@lists.bufferbloat.net \
--cc=pete@heistp.net \
--cc=toke@toke.dk \
/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