Some special questions about queues...

First question:

I use simple queues to slow down p2p traffic and to limit bandwidth for each customer..
For the following example I have a problem..

Internet connection with 10 Mbit
For all customers a queue with max 1Mbit download and one queue for P2P-Traffic with max 2Mbit download.

I want that each customer has a max download of 1mbit, but with the configuration above when only one customer is online he can use the full 2mbit with P2P + 1mbit for other traffic so he can use 3mbit, but thats not what I want!

How to do that all can use max 2mbit P2P and each customer only have 1mbit download?!?

Second question:

I think burst in queues a usually used for short time. But I try to limit customers which have a high amount of traffic over a longer time.


Over short time it works fine. An example how I calculate the settings.
I want that the first 5MB go fast with 1Mbit an then slow down to 128kbit with a Burst Time of 100s.
Max Limit: 128k
Burst Limit: 1000k
Burst Threshold: 410k
Burst Time: 100s

The only thing that was to calculate is the Burst Threshold.
5Mbyte * 1024 = 5120Kbyte 5120Kbyte / 100s = 51,2 Kbyte/s (the threshold is the average over the burst time)
51,2 Kbyte/s * 8 = 409,6Kbit/s (1byte = 8bit, bandwidth is in kbits)

When I use these Settings in experiments it works really exactly. Till 5MB 1 Mbit download an then slow down to 128kbit !!


Now the question. I want to use it for much longer time. Maybe I want that a customer can max download 1GB on one day with 1Mbit an then slow down to 128kbit.
When I calculate the settings for the queues like above it doesn’t work. The example with 1GB on one day i tested till 2GB an there was no slow down! :frowning:

Is there a max Burst Time so that higher values doesn’t work? In documentation I read that it is an Integer value so the limit may about 32786?

make it so the PTP queue and the customer 1Mbit queue are tied to different interfaces and it should work

how to do this?

I use PPPoE so there are dynamic queues. It seems that when the customers use P2P that this traffic only runs through the P2P queue and in the PPPoE-Queue this traffic is not counted.
Is there no simple setting that the traffic can be count in both queues so that the PPPoE-Queue limit the traffic to 1Mbit?