[Cake] Wifi Memory limits in small platforms
moeller0 at gmx.de
Fri Aug 23 02:48:20 EDT 2019
> On Aug 23, 2019, at 01:39, Dave Taht <dave at taht.net> wrote:
> Sebastian Gottschall <s.gottschall at newmedia-net.de> writes:
>>>>> 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.
>>> I 110% agree that a system that can stay up for years is much better
>>> than one that is fast for 5 minutes!
>>> However I'd like a chance, in collaborating with you and your upcoming
>>> patches - to try and narrow
>>> down crash bugs to various subsystems and be able to get some
>>> benchmarks done that I simply
>>> couldn't do anymore at the financial conclusion of the make-wifi-fast
>>> and cake projects.
>>> I think I have a lot of gear that is dd-wrt compatible - apu2,
>>> wndr3700s, 3800s....
>> if its v4, these are having 128 mb (i have them too).
> These are from the cerowrt era, so, 32 or 64MB of ram.
I believe we only used wndr3700v2 (64MB) and wndr3800 (128MB), at least those were the recommended ones. I also remember making these OOM with a simple UDP flood with randomized port addresses quite easily intially. That is, until we used fq_codel's limit keyword to restrict the number of maximally queued packets. This experience also carried into cake and culminated into the memlimit keyword. It seems I completely missed the addition of the "memory_limit BYTES" keyword to fq_codel, which seems a better fit to our needs than the "limit 1001" we currently use (why 1001 instead of 1000, simply to be able to quickly see whether this is our limit or something the user used, pleople ted to leave the last digit alone when playing with these parameters ;)).
I guess I have not bothered to repeat that test since fq_codel became the default qdisc in OpenWrt...
>> and apu2 has 2
>> gb. so its getting real interesting
>> if you choose such a bad one with 32 mb ram which are still commonly
>> used by "freifunk"
> One thing we can start doing more 'round here is to boot the x86 boxes
> with mem=32MB or something similar (40% larger due to 64 bits? no idea,
> maybe look at free mem on a similar config) to see what shows up.
> For example, one of my APU2s has dual ath9/ath10k cards which is a
> a reasonable sim of one of your configs.
>>> The reduce truesize patch had helped a lot at the time (2012). There
>>> were all kinds of flaky bugs that disappeared.
>> i tested and it helped to make ethernet unavailable. it worked for
> thx for making me chortle in sad empathy.
>> wifi interfaces. but the eth0 and eth1 on my ipq8064 based
>> testboard did not work anymore. no dhcp lease, no ping. but i was able
>> to capture inbound packets. (qos was not even enabled while testing,
>> so no cake, fq_code letc. just standard sfq scheduler)
>> so i reverted and all worked again
> OK. Thx for trying. there have been so many bugs in gso/gro and hardware
> offloads that I figure that that's why the patch was dropped over time.
> is cake's gso-splitting working on that same hardware? I'm not sure
> to what extent that reduces packet size or not these days.
> I'll try that again on x86, maybe it needed to pullskb....
>>> the new drop monitor patchset looks WONDERFUL for seeing more about
>>> packet drop behavior in the stack, but
>>> it's a 5.3(?) feature only.
>> i love backporting :-)
> I used to but these days I'm content to work out of net-next x.y.0-rc4
> or later. I get more sleep that way. Oh, wait, it just hit that....
>>> I note that I run 18.06.1 on my 32MB pico and nanostations on the
>>> lupin campus, but I run no gui, few additional applications at all
>>> (except babel, snmpd, netperf, and the other core needed daemons). My
>>> uptimes are principally governed by power failures. I can't remember
>>> the last "crash, crash" I had, and I do track memory leaks (none).
>>> That said, I'm painfully aware that I should probably give dd-wrt and
>>> openwrt 19.x some testing just to make sure there's no regressions,
>>> but have been reluctant to get involved again without more partners in
>>> crime, because the scars from deploying 18.x widely are only beginning
>>> to heal... and only last week did the needed babel 1.9 upgrade arrive
>>> so I can finally redeploy ipv6 universally. I fear my current
>>> reliability metrics are so good because I took down ipv6 last year....
>> my workaround with memory problems is also disabling http normally. i
>> have some of these nanostations in the field
>> just running hostapd, snmp, syslog. but anything else is disabled due
>> the oom problematics. it never was a real crash.
>> but oom. but i never played with babel. ospf etc. all working out of
>> the box based on quagga on low end devices and frr on bigger ones.
>>> root at pool2:~# free
>>> total used free shared buffers
>>> Mem: 28480 23796 4684 92 1868
>>> -/+ buffers: 21928 6552
>>> Swap: 0 0 0
>>> root at pool2:~# uptime
>>> 11:38:09 up 43 days, 21:37, load average: 0.04, 0.03, 0.04
>>> Same workload over here, on a wndr3800, almost exactly the same config
>>> root at couch:~# free
>>> total used free shared buffers cached
>>> Mem: 60320 22872 37448 68 1960 6120
>>> -/+ buffers/cache: 14792 45528
>>> Swap: 0 0 0
>> root at TRO1:~# free
>> total used free shared buff/cache
>> Mem: 29124 19228 3552 0 6344 7752
>> Swap: 0 0 0
> It looks like you are running even less stuff than I am. And this
> machine is running with 256k bufs?
>> root at DD-WRT:~# free
>> total used free shared buff/cache
>> Mem: 125884 23048 92940 0 9896 99824
>> Swap: 0 0 0
>> root at DD-WRT:~#
>>>> 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
>>>> 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 :)
>>> Dave Täht
>>> CTO, TekLibre, LLC
>>> Tel: 1-831-205-9740
> Cake mailing list
> Cake at lists.bufferbloat.net
More information about the Cake