Cake - FQ_codel the next generation
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Sebastian Gottschall <s.gottschall@newmedia-net.de>,
	Dave Taht <dave@taht.net>
Cc: Dave Taht <dave.taht@gmail.com>,
	Cake List <cake@lists.bufferbloat.net>,
	Battle of the Mesh Mailing List <battlemesh@ml.ninux.org>,
	make-wifi-fast@lists.bufferbloat.net
Subject: Re: [Cake] Wifi Memory limits in small platforms
Date: Thu, 22 Aug 2019 20:23:39 +0200	[thread overview]
Message-ID: <87pnkxnjo4.fsf@toke.dk> (raw)
In-Reply-To: <e7e08148-5791-2afc-f26c-6c4a0a3f1a9d@newmedia-net.de>

Sebastian Gottschall <s.gottschall@newmedia-net.de> writes:

> Am 22.08.2019 um 19:03 schrieb Dave Taht:
>> Sebastian Gottschall <s.gottschall@newmedia-net.de> writes:
>>
>>> Am 22.08.2019 um 15:15 schrieb Dave Taht:
>>>> It's very good to know how much folk have been struggling to keep
>>>> things from OOMing on 32MB platforms. I'd like to hope that the
>>>> unified memory management in cake (vs a collection of QoS qdiscs) and
>>>> the new fq_codel for wifi stuff (cutting it down to 1 alloc from four)
>>>> help, massively on this issue, but until today I was unaware of how
>>>> much the field may have been patching things out.
>>>>
>>>> The default 32MB memory limits in fq_codel comes from the stressing
>>>> about 10GigE networking from google. 4MB is limit in openwrt,
>>>> which is suitable for ~1Gbit, and is sort of there  due to 802.11ac's
>>>> maximum (impossible to hit) of a txop that large.
>> I did kind of conflate "qos + fq_codel" vs wifi in this message. It
>> looks like yer staying with me.
>>
>>>> Something as small as 256K is essentially about 128 full size packets
>>>> (and often, acks from an ethernet device's rx ring eat 2k).
>>> what i miss in mac80211 is the following option "fq_codel = off"
>>> its essential and i will definitly work on a patch to deal with this
>>> way for low memory 802.11n platforms.
>> Well, it would be my hope that turning it off would A) not help that
>> much on memory or cpu and B) show such a dramatic reduction in
>> multi-station performance that you'd immediately turn it on again.
> isnt it better to have a working platform with less performance than a 
> crashing platform with no performance?
> i mean i can user older mac80211 versions without that issue on a 
> typical nanostation 2/5 which is often used just as CPE device

So before the queueing patches to mac80211, the maximum packet queue
size for ath9k was 3MB in total, or 2.2MB if only a single AC was used
on the WiFi link (that's 128 packets in the driver + 1000 in the
pfifo_fast qdisc * 2074 bytes for the truesize of a full-size packet).
Whereas now the default is 4MB for a non-vht device. So it's not
actually that big of a difference, and as you've already discovered the
defaults can be changed.

Would it be helpful to add support for setting the memory limit in
hostapd (to avoid having to patch the kernel default)?

> but with current mac80211 versions (current means last 2-3 years). they 
> are just unstable and running out of memory after a while
> the only thing which helped was cutting of the memory limit of fq_codel 
> inside mac80211
> i also have another fancy testunit which is a linksys wrt400 with 32 mb 
> ram and 2 ath9k based wifi chipsets. no hope here fonr running stable
> for only 5 minutes even with a single connection under load (my crashing 
> test is running a hdtv iptv stream converted to unicast using a 
> stateless eoip tunnel)
>
>> I try to encourage folk to run the rtt_fair tests in flent when
>> twiddling with wifi. Those really shows how bad things are when you
>> don't have ATF + FQ + Per station aggregation and lots of
>> clients. Single threaded tests are misleading.
> i know but even single threaded tests arent working good on such 
> devices. so there is no need to talk about the benefits of atf,fq_codel etc.
> but there is need to talk about configurable use of it which also allows 
> to disable it if required.

Disabling the fq part won't actually gain you much in terms of memory
usage, though, as most of it is packet memory which is already
configurable.

The one exception to this is the static overhead of 'struct fq_flow', of
which mac80211 currently allocates 4k. That's 300k of memory which is
currently not configurable. But that could be fixed :)

-Toke

  reply	other threads:[~2019-08-22 18:23 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-18 16:33 [Cake] cake in dd-wrt Dave Taht
2019-08-20 12:08 ` Sebastian Gottschall
2019-08-20 16:24   ` Dave Taht
2019-08-20 16:47     ` Sebastian Gottschall
2019-08-20 16:58       ` Toke Høiland-Jørgensen
2019-08-20 17:29         ` Sebastian Gottschall
2019-08-20 17:47           ` Toke Høiland-Jørgensen
2019-08-20 18:10             ` Sebastian Gottschall
2019-08-20 18:31               ` Toke Høiland-Jørgensen
2019-08-20 18:39                 ` Sebastian Gottschall
2019-08-20 18:49                   ` Toke Høiland-Jørgensen
2019-08-21  7:25                     ` Sebastian Gottschall
2019-08-20 19:07                   ` Jonathan Morton
2019-08-20 23:43                     ` Dave Taht
2019-08-21 10:21                       ` Toke Høiland-Jørgensen
2019-08-21 11:03                         ` Sebastian Moeller
2019-08-21 13:10                         ` Dave Taht
2019-08-21 14:52                         ` Jonathan Morton
2019-08-21 15:42                           ` [Cake] pie " Dave Taht
2019-08-21 16:12                             ` Sebastian Gottschall
2019-08-21 16:21                               ` Sebastian Moeller
2019-08-21 16:28                                 ` Sebastian Gottschall
2019-08-21 16:50                                   ` Dave Taht
2019-08-21 21:40                                     ` Toke Høiland-Jørgensen
2019-08-21 21:53                                       ` Dave Taht
2019-08-22  9:18                                         ` Sebastian Gottschall
2019-08-22 13:15                                           ` [Cake] Wifi Memory limits in small platforms Dave Taht
2019-08-22 14:59                                             ` Dave Taht
2019-08-22 15:48                                             ` Sebastian Gottschall
2019-08-22 17:03                                               ` Dave Taht
2019-08-22 17:37                                                 ` Sebastian Gottschall
2019-08-22 18:23                                                   ` Toke Høiland-Jørgensen [this message]
2019-08-22 18:56                                                     ` Dave Taht
2019-08-22 19:37                                                       ` [Cake] [Battlemesh] " Toke Høiland-Jørgensen
2019-08-22 20:10                                                         ` Sebastian Moeller
2019-08-22 20:30                                                       ` [Cake] " Sebastian Gottschall
2019-08-22 23:39                                                         ` Dave Taht
2019-08-23  6:25                                                           ` Sebastian Gottschall
2019-08-23  6:48                                                           ` Sebastian Moeller
2019-08-22 20:32                                                       ` [Cake] fq_codel_fast crash/lockup Sebastian Gottschall
2019-08-21 21:39                                   ` [Cake] pie in dd-wrt Toke Høiland-Jørgensen
2019-08-22  9:17                                     ` Sebastian Gottschall
2019-08-22 10:12                                       ` Toke Høiland-Jørgensen
2019-08-21  7:30                     ` [Cake] cake " Sebastian Gottschall
2019-08-20 18:05       ` Sebastian Gottschall
2019-08-20 23:43         ` Dave Taht
2019-08-20 23:34       ` Dave Taht
2019-08-21  7:44         ` Sebastian Gottschall
2019-08-21  7:44       ` Sebastian Moeller
2019-08-21  7:50         ` Sebastian Gottschall
2019-08-21  7:56           ` Sebastian Moeller
2019-08-21  9:04             ` Sebastian Gottschall
2019-08-21  9:17               ` Sebastian Moeller
2019-08-21 13:20           ` Dave Taht
2019-08-21 16:06             ` Sebastian Gottschall
2019-08-20 18:18 ` Sebastian Gottschall
2019-08-20 23:50   ` Dave Taht
2019-08-21  7:47     ` Sebastian Gottschall

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=87pnkxnjo4.fsf@toke.dk \
    --to=toke@redhat.com \
    --cc=battlemesh@ml.ninux.org \
    --cc=cake@lists.bufferbloat.net \
    --cc=dave.taht@gmail.com \
    --cc=dave@taht.net \
    --cc=make-wifi-fast@lists.bufferbloat.net \
    --cc=s.gottschall@newmedia-net.de \
    /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