Cake bandwidth configuration

  • ATTENTION! As of November 1, 2020, you are not able to reply to threads 6 months after the thread is opened if there are more than 500 posts in the thread.
    Threads will not be locked, so posts may still be edited by their authors.
    Just start a new thread on the topic to post if you get an error message when trying to reply to a thread.

networkplumber

New Around Here
I see a bug when configuring upload/download bandwidth QoS (with Cake in 386.2_6)

# tc qdisc show
qdisc cake 8003: dev eth0 root refcnt 2 bandwidth 10240Kbit diffserv3 dual-srchost nat nowash no-ack-filter split-gso rtt 100ms noatm overhead 18 mpu 64
qdisc cake 8004: dev ifb4eth0 root refcnt 2 bandwidth 307200Kbit besteffort dual-dsthost nat wash ingress no-ack-filter split-gso rtt 100ms noatm overhead 18 mpu 64

This is wrong. In communications K = 1000 and M = 1000000 (SI units) in storage and other places K = 1024 (IEC units).
The iproute2 commands get this right, looks like somewhere in the GUI to qdisc scripts somewhere is using wrong multiplier.
 

pdc

Regular Contributor
Does this mean when we enter e.g. 100 Mbps in the QoS configuration, we are actually configuring 100 x 2^20 bps(Mebibits/sec), which is actually 105 x 10^6 bps(Megabits/sec)? Is this why the recommendation to use 95% of speedtest? Or should we be using 95% of the 95% (->90%) to compensate for mebi/megabits?
 

dave14305

Part of the Furniture
When you enter 100 Mb/s in the QoS page, it’s stored in nvram as 102400 kbps. The tc interface interprets it as 102400 kilobits (not kibibits). So I think you’re only overstating by 2.4%. This is all unrelated (AFAIK) to the 95% recommendation.

Being ultra-nerdy, I manually update nvram with my adjusted kilobit values. It displays oddly in the GUI, but I know the bandwidth is where I want it, plus I personally spend a lot of time looking at tc output so the rounder Mbits are easier to glance at.
 

pdc

Regular Contributor
Thanks Dave! Ultra-nerds represent! (My friends think I am an ultra-nerd for running custom firmware on my router, how little they know of nerdom ;))
 

heysoundude

Very Senior Member
Thanks Dave! Ultra-nerds represent! (My friends think I am an ultra-nerd for running custom firmware on my router, how little they know of nerdom ;))
they might change their tune after using your network for a while, with local DNS caching, ad-blocking...

To the original query, I just put in the 7-day Avg numbers from spdMerlin and call it a day. The graphs are populating within a percent or two of my subscribed rates (and in higher than, on the UL side), and data flows nicely in both directions. Bufferbloat is A/A+
 
Last edited:

networkplumber

New Around Here
Iproute already supports configuration with iec units which seems to be what Asus wants.
Assuming you have real iproute2 not the busybox version.
 

Similar threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top