From: Sebastian Gottschall <s.gottschall@newmedia-net.de>
To: Jonathan Morton <chromatix99@gmail.com>
Cc: "Toke Høiland-Jørgensen" <toke@redhat.com>, cake@lists.bufferbloat.net
Subject: Re: [Cake] cake memory consumption
Date: Tue, 17 Sep 2019 11:55:08 +0200 [thread overview]
Message-ID: <cf9270f0-90b4-2157-123c-245c87b95d0f@newmedia-net.de> (raw)
In-Reply-To: <44AD9976-DC81-47F7-BBB3-0D884C880A29@gmail.com>
Am 17.09.2019 um 11:21 schrieb Jonathan Morton:
>> On 17 Sep, 2019, at 8:31 am, Sebastian Gottschall <s.gottschall@newmedia-net.de> wrote:
>>
>> according to the output there is a flaw/bug in the memory limit calculation
>> cake_reconfigure may set buffer_limit to ~0 if no rate is set.
>>
>> the following line "min(buffer_limit, max(sch->limit * psched_mtu(qdisc_dec(sch), q->buffer_config_limit))" doesnt make it better since buffer_config_limit is not configured
>> so we got a possible memory overuse here.
> In C, ~0 means "as near to infinity as an unsigned integer can get", or effectively 4GB. That construct is used to get that part of the calculation out of the way, so that it has no effect in the following nested max() and min() macros.
>
> What actually happens here is that the "packet limit" property of the interface becomes governing, and is recalculated in terms of a byte count by multiplying it by the MTU. So the limit configured for each Cake instance in your particular case is 15MB, corresponding to 10,000 packets:
>
>> memory used: 0b of 15140Kb
> With so many Cake instances loaded (very much *not* the normal configuration!) and only 128MB total RAM, 15MB is obviously too high a limit to be completely safe - even though Cake's AQM action will keep the *average* queue depth well below that limit.
>
> The correct fix here is not to change the code, but to use the memlimit parameter to override the default. These unusual configurations, where the default logic breaks, are precisely why it was added.
okay. so i will handle it custom in my code depending on the device memory
>
> - Jonathan Morton
>
>
next prev parent reply other threads:[~2019-09-17 9:56 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-07 22:42 [Cake] Fighting bloat in the face of uncertinty Justin Kilpatrick
2019-09-07 23:09 ` Jonathan Morton
2019-09-07 23:31 ` Justin Kilpatrick
2019-09-07 23:42 ` Jonathan Morton
2019-09-08 0:03 ` Justin Kilpatrick
2019-09-08 0:59 ` Jonathan Morton
2019-09-08 14:29 ` Justin Kilpatrick
2019-09-08 17:27 ` Jonathan Morton
2019-09-16 10:21 ` [Cake] cake memory consumption Sebastian Gottschall
2019-09-16 12:00 ` Dave Taht
2019-09-16 12:51 ` Dave Taht
2019-09-16 13:31 ` Sebastian Gottschall
2019-09-16 13:22 ` Sebastian Gottschall
2019-09-16 13:28 ` Justin Kilpatrick
2019-09-16 13:39 ` Jonathan Morton
2019-09-16 13:54 ` Sebastian Gottschall
2019-09-16 14:06 ` Jonathan Morton
2019-09-17 5:10 ` Sebastian Gottschall
2019-09-16 13:47 ` Sebastian Gottschall
2019-09-16 12:08 ` Toke Høiland-Jørgensen
2019-09-16 13:25 ` Sebastian Gottschall
2019-09-16 14:01 ` Toke Høiland-Jørgensen
2019-09-17 5:06 ` Sebastian Gottschall
2019-09-17 5:21 ` Sebastian Gottschall
2019-09-17 5:31 ` Sebastian Gottschall
2019-09-17 9:21 ` Jonathan Morton
2019-09-17 9:55 ` Sebastian Gottschall [this message]
2019-09-17 5:33 ` Sebastian Gottschall
2019-09-17 9:40 ` Toke Høiland-Jørgensen
2019-09-18 7:19 ` Sebastian Gottschall
2019-09-18 9:53 ` Toke Høiland-Jørgensen
2019-09-18 9:57 ` Sebastian Gottschall
2019-09-18 10:22 ` Toke Høiland-Jørgensen
2019-10-03 17:52 ` [Cake] Fighting bloat in the face of uncertinty Justin Kilpatrick
2019-10-03 18:41 ` Dave Taht
2019-10-03 19:04 ` 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=cf9270f0-90b4-2157-123c-245c87b95d0f@newmedia-net.de \
--to=s.gottschall@newmedia-net.de \
--cc=cake@lists.bufferbloat.net \
--cc=chromatix99@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