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

Customer VS Device in flat architecture #400

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

Customer VS Device in flat architecture #400

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

Comments

@jaber-the-great
Copy link
Contributor

Hi
What is the difference between a customer and device in flat architecture? I was running LibreQoS and realized the devices connected to the same customer should have same Min/Max download/upload bandwidth. I guess the only difference would be different IP addresses assigned to to different devices of a customer which would help for host isolation (fairness). Is there any differences between defining several device for a customer and defining one device with several IP addresses?
@dtaht Since devices can borrow bandwidth from each other due to HTB architecture, I think cake would work the same. Correct me if I'm wrong.

Also, in the example provided in the documentation, we add a customer (and define the bandwidth in the customer) and then add a device to that customer with associated IP address. Is it OK to directly define the BW in the device and not define any customer as the parent of the device? PS: in this way, we would have a flat architecture where all the devices directly connect to the root.

@rchac
Copy link
Member

rchac commented Oct 1, 2023

the devices connected to the same customer should have same Min/Max download/upload bandwidth.

They will, provided the CircuitID is set to be the same for all devices for that customer.

Is there any differences between defining several device for a customer and defining one device with several IP addresses?

Not in terms of shaping, no. It's the same result. It may render on the Web UI differently. Let's say you defined 10 devices for one customer. You have 20 IP filters in XDP all pointing at a single TC CAKE qdisc representing that customer. So if a customer pulls 50Mbps for device A and 50 Mbps for device B, the customer's qdisc will show 100Mbps throughput. Because every customer device points to the same qdisc, you don't have to worry about multiple devices for one customer impacting host fairness.

Is it OK to directly define the BW in the device and not define any customer as the parent of the device? PS: in this way, we would have a flat architecture where all the devices directly connect to the root.

There's an HTB per CPU core, so there is no "root" qdisc you can attach customers/devices to (the mq qdisc is the true root but spans out to HTBs per core). You can pack all your clients onto one HTB root, but that then limits everything to one CPU core and 1-8Gbps depending on that CPU's speed.

There's no real performance drawback to using customers in the hierarchy. If you want to be able to rate limit LibreQoS throughput at the edge with one big shaper (to prevent packet loss when exceeding your upstream ISP connection's rate), the best bet is to use a system with a very high single-thread Passmark rating and few CPU cores, assigning every customer/circuit to the same Node (which will run on CPU 0). That way whatever rate you set for that Node will be the true ceil for all customers. That only works up to about 8Gbps though. Another way would be to divvy up traffic per CPU core (4X top nodes using 250M each when you have 1Gbps upstream). That way it's not possible to exceed the upstream rate.

@jaber-the-great
Copy link
Contributor Author

Thanks for you explanation.

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