Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Min upload/downlaod rate in custom network #401

Open
jaber-the-great opened this issue Sep 26, 2023 · 2 comments
Open

Min upload/downlaod rate in custom network #401

jaber-the-great opened this issue Sep 26, 2023 · 2 comments

Comments

@jaber-the-great
Copy link
Contributor

Hi,
When defining network in custom mode (not using UISP/Splynx), we can only set the max upload download rate. Then, when creating shaped devices in line , we consider 98% of max upload/download as the min upload/download.
The min bandwidth determines the rate of the HTB and the max bandwidth determines the ceiling(burst size)

  1. I think it would be good idea if we can specify it directly when creating custom network. Currently I first create the network and then edit the ShapedDevices.csv
    Since I need this feature, I can go ahead and implement it and add it as a feature to LibreQoS
  2. Is there any specific reason for choosing 98%? Shouldn't we allow larger burst size?
@rchac
Copy link
Member

rchac commented Oct 1, 2023

We did try that at one point. The problem is that using "rate" for HTBs (nodes) in that way results in the burst never being used for any leafs of that HTB. That becomes a tremendous hassle to troubleshoot. For HTBs, we set Ceil as the upper limit, and set Rate very close to the Ceil amount (98%, but it could be 100% too I think) so that every deeply nested node still has some chance of providing bandwidth up to or near its Ceil rate. Doing it this way allows HTB to handle cases where there is some small level of over-subscription or over-provisioning at some choke-point along the hierarchy (applicable to 99% of modern networks). Adding a rate/ceil for the nodes/network.json would lead to major network issues for anyone who tries to use it that way.

@jaber-the-great
Copy link
Contributor Author

jaber-the-great commented Oct 2, 2023

Thank you for explanation.
I had this intuition when I was reading CAKE and LibreQoS source code:
CAKE uses rate based limiter instead of token bucket. LibreQoS uses hierarchical token bucket instead of a rate based limiter. Therefore, to make the HTB work like a token bucket, we set the rate and ceil of HTB equal for each queue. When the burst size and rate are equal, it works as a rate based limiter (here). However, for each node in the subtree of HTB, we can set the min and max bandwidth as LibreQoS.py does it in here

  1. Does libreQoS require that the min and max bandwidth to be so close to each other to work correctly (eg min = 0.98 * max). If I set the minimum to 10Mbps and max to 35Mbps, doe it mess up with libreQoS configuration?
  2. In the ShapedDevices.example.csv file provided by LibreQoS, we are not following this rule. For example we have:
    "525 Birchpond St., Romulus, MI 48174",11,Device 11,Site_1,,100.64.0.11,fdd7:b724:0:b00::/56,25,5,105,18,
    which sets:
    min download: 25 // max download: 105
    min upload: 5 // max upload = 18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants