CAKE w/ Adaptive Bandwidth

I need some help with the values for min, max and base bandwidth values.

So my ISP throttles both download and upload speeds to 5Mbps when we exceed a certain usage limit. If I read the GitHub readme correctly should I then set the min bandwidth to 5Mbps or a little lower? As for max bandwidth should I set it to the the speeds I get before hitting the usage limit? And for the base bandwidth should I set it to the value of min bandwidth or something similar to it?

When throttled down to 5 Mbps by your ISP is the bufferbloat not then gone? If so you can just set the values as you would have without the throttling.

1 Like

I don't think I quite understand what you mean.

Let me explain my situation a bit more. I have a fiber connection and after a certain amount of usage every month the speed will be throttled to 5Mbps. The unthrottled speed depends on the internet plan we select (I think we have the plan for 30Mbps download speed). What I want is changing SQM bandwidth depending on whether my speed is throttled or not (would cake-autorate help with this or is there a better solution?).

I'm also just asking for future reference since the router I ordered will probably arrive tommorow or the day after that.

In upload direction likely not... and there is also no reason why this necessarily should be less bufferbloat in download direction (after all, if the ISP had decent rate-aware queueing cake-autorate would not be that necessary in the first place).

The rationale to set the shaper minimum is not so much what you ISP does or does not do, but really the rate below which you care less about latency and more about throughput...

The rationale for the max is more, you are certain that you never get more (useful) capacity than that so trying to search for sustainable rates above that rate is futile and a waste of time. (Or the rate from which on you do not care about more thopughput anymore).

Your policy... I tend to think that this rate should be the rate that you expect to be usable for the majority of time, as that is what cake-autorate will default to after enough quiet periods. If you are pessimistic, close to the minimum rate might be fine, if you are optimistic close to the maximum might be fine, often there might be a rate between the two extremes that you are comfortable as considering your link's typical rate... but your network, your rules/policy, so take all of the above simply as my opinion...

1 Like

Autorate with minimum set to close to 5 Mbps probably would hobble past this issue, but that is not really ideal... as you really know that once your high speed volume is used up you will be limited for the rest of the month there is little utility in probing above 5 Mbps for the month's reminder...
I am glad that this kind of contract is not the norm where I live...

I probably would consider adding a cron job that will reset the min/base/max values on the first of each month (run a script daily at midnight and check whether the day is the first of the current moth, if yes reset the rates), and in addition manually et the rates all to 4.5 Mbps once the limit engages (unless you can check the limit algorithmically, then changing the rates down could also be automated with a script. Note I would not trigger this based on a single capacity tests, as there are potential reasons for low throughput independent of your ISP's limits).

I would also consider whether changing ISPs to one with a true flat rate might not be an option...
Datavolume is not a good proxy for an ISP's cost, so price differentiation based on monthly volume is pretty artificial and really just a way fore ISPs to earn more money... (ISPs have fixed costs, which already occur if you have zero data volume, and they have variable costs that depend on capacity utilisation during peak-times, monthly averages are bad proxies for peak time usage...)

1 Like

In upload direction likely not... and there is also no reason why this necessarily should be less bufferbloat in download direction (after all, if the ISP had decent rate-aware queueing cake-autorate would not be that necessary in the first place).

The rationale to set the shaper minimum is not so much what you ISP does or does not do, but really the rate below which you care less about latency and more about throughput...

The rationale for the max is more, you are certain that you never get more (useful) capacity than that so trying to search for sustainable rates above that rate is futile and a waste of time. (Or the rate from which on you do not care about more thopughput anymore).

Your policy... I tend to think that this rate should be the rate that you expect to be usable for the majority of time, as that is what cake-autorate will default to after enough quiet periods. If you are pessimistic, close to the minimum rate might be fine, if you are optimistic close to the maximum might be fine, often there might be a rate between the two extremes that you are comfortable as considering your link's typical rate... but your network, your rules/policy, so take all of the above simply as my opinion...

I would also consider whether changing ISPs to one with a true flat rate might not be an option...

It would be nice if we had an ISP like that. Pretty much all ISPs in my country have a usage limit on their plans (there's a really small one that offer actual unlimited plans I think? but they are only available on just a couple of places unlike the other two ISPs). Even their so called unlimited plans have a usage limit of 5TB on the cheapest plan (they have this info pretty hidden).

Anyways thanks for the help.

If I might ask, which country are we talking about here?

It's Maldives. Our speeds used to get throttled to 2Mbps iirc before covid. During covid they increased the throttled speed to 5Mbps on all plans except for the cheapest one that offers 5Mbps unthrottled speed.

1 Like

I guess being a small island group that means almost all traffic will need to use costly transit... (that still does not explain the billing by volume, but might explain the lack of true flat rate options, the variable cost component might simply be bigger for your ISPs than in mainland markets where fiber runs to IXPs are much cheaper than submarine cables...).
Out of curiosity, is starlink offering services in your area?

Yeah I believe starlink is available. Looking through the maldives subreddit some people talk about using starlink.

It would work for the house we have in my home island but I don't really know how useful it would be for the apartment I'm now living in rn. From what I looked at the monthly cost is pretty low compared to other ISPs we have (latency might be the only problem). Starlink costs MVR 1000 (about $64) and the cheapest unlimited plan with 50Mbps download speed (actually a 5TB plan before getting throttled to 5Mbps speed if the plan is from the 2 major ISPs) from ISPs we have costs between MVR 1449 and MVR 1690 (between $93 and $109).

1 Like

BTW, I am not trying to push for or against starlink as an ISP, I really just wanted to know the options. Latency-wise starlink, on average is not that bad, they cleaned up their act considerably (see here, attention this is data from starlink not from a third party, but I believe it matches what others observed as well).

3 Likes

Ik that you weren't pushing for Starlink. I just looked up some information about it because I was kinda curious. That said It's good to know that they improved their latency.

1 Like

Not sure you need to? Thinking on the fly here since I’ve not had to deal with this myself.

Can’t you ignore the throttling by ISP and let cake-autorate do its thing?

If usable bandwidth is below ISP-throttled bandwidth, then cake-autorate will drop bandwidth below the ISP-throttled bandwidth as per normal, else cake-autorate will push bandwidth a bit higher than what’s achievable, but only by so much since the achieved rate will tail off. This is because bandwidth increases are only permitted when the achieved rate consumes a sufficient quantity of the cake bandwidth. Since in the latter case there is no bufferbloat, the fact that the cake bandwidth might get set a bit too high won’t matter so much.

Does this seem reasonable @moeller0?

Naturally we can adapt cake-autorate to permit adjusting the bandwidths on the fly. Perhaps using a dynamic script in the /var/run directory like the existing ones. But only if this turns out to be necessary.

I can probably start testing cake-autorate tommorow after flashing OpenWrt on the router.

I was expecting the Flint 2 I ordered to take one more day to arrive but it looks like the package just came in today. It will probably be delivered to my place tommorow.

1 Like

Cool. By the way I have personally also considered Starlink but in my case the expense isn’t justified because with cake-aurorate latency is kept in check on my relatively inexpensive 4G connection that is really a mobile phone contract with unlimited data, but, thanks to the net neutrality provisions requiring operators to permit use of any end user equipment, works just fine for serving the data needs of our entire household (circa 250 GB/month).

Sure, but that means that the minimum rate needs to be <= 5 Mbps (which might not be desired in normal operation) and if the baseline rate is considerably above 5 Mbps every wake up from almost no traffic will cause a latency spike... but certainly worth testing as that might already be good enough.

EDIT: catastrophic typo, thanks for catching that @Lynx

Why? It can be allowed to go below surely? What’s the issue with that?

Say ISP throttles at 5 Mbps but usable bandwidth is actually 2 Mbps then cake-autorate will knock down to the 2 Mbps. If the usable bandwidth is higher than 5 Mbps then the achieved rate will never exceed 5 Mbps and cake-autorate will set the bandwidth just above 5 Mbps.

So minimum cake-autorate bandwidth can be set wherever needed.

Am I missing something?

My bad, pretty bad typo I made there. Thanks for giving me the benefit of the doubt here :wink:

You are spot on, and that is the argument I wish I had made explicitly so my typo would have been obvious...

1 Like

Ah gotcha - I see now. Thought I was just being slow as usual.