Page 1 of 1

PCQ

Posted: Mon Nov 19, 2007 11:39 am
by Chupaka
Is it possible to divide bandwidth with PCQ not equally, but with some proportions. e.g. ordinary users get equal proportions, but some users get double or triple bandwidth?

Re: PCQ

Posted: Mon Nov 19, 2007 2:12 pm
by ashish
You can use different subnet for ordinary & other users

Re: PCQ

Posted: Mon Nov 19, 2007 2:13 pm
by GWISA
That should be possible to do by IP - then just create different PCQ types for the different classes and assign them to the appropriate queue... with priorities if you want some users (IP's) to have preferential access...

Re: PCQ

Posted: Mon Nov 19, 2007 10:54 pm
by Chupaka
i have limited bandwidth, 288 kbit/s
i have pcq queue for download, with rate 56 kbit/s
when there's 8 users, bandwidth is divided equally by pcq, and each user have its 36 kbit/s.
i want to give some users double bandwidth compared with other users, e.g. with 6 users + 1 vip ( :) ) i want they have 36k, and vip have 72k download

Re: PCQ

Posted: Tue Nov 20, 2007 1:45 am
by GWISA
use queue tree or simple queue with priorities and different 'limit at' settings for the normal and VIP class. They'll both have the same parent with your total max, and both have the same max limit.

Then classify by IP & packet mark and queue accordingly with higher priority for VIP users. Set proportianate limits for how you want to reserve bandwidth when the link becomes congested.

The 'limit at' will govern the proportion when full, and the max-limit will enable the whole supply to be used when it is available.

Re: PCQ

Posted: Tue Nov 20, 2007 2:26 pm
by Chupaka
i cannot use 'limit-at' because i don't know, how much vip users is online
does two pcq rules divide bandwidth in proportion to pcqs' 'rate'? i don't think so =(

Re: PCQ

Posted: Tue Nov 20, 2007 3:34 pm
by GWISA
I don't think you're seeing what I'm trying to say

Check out some examples on Queue trees and/or simple queue trees and how to manage them for clarification. ( ie, the manual ;) )
i cannot use 'limit-at' because i don't know, how much vip users is online
You can - this is what the function is for, to limit at 'x' rate when the parent queue is full, else give more b/w.

The 'limit at' of each class should add up to the 'max-limit' on the parent of the tree.

Max limit may or may not be the same for each class, and also may or may not be the same as the parent max limit.
does two pcq rules divide bandwidth in proportion to pcqs' 'rate'? i don't think so =(
No, they divide by whatever you set them to divide the master source by (parent in tree). You can, however setup different PCQ's with different rates for different classes. You can also just leave the PCQ rate at 0, and it will balance equally amongst no of users online in that class and according to what you set in 'limit-at' and 'max-limit'.

Hope I'm making sense here....

Re: PCQ

Posted: Tue Nov 20, 2007 4:09 pm
by Chupaka
now it's my turn...

i do not have limiting on queue, i only set pcq rate. that's because i don't want limit total bandwidth, i only want to divide it. one queue with type=pcq divides traffic equally. now i want to give some costomers wider bandwidth. not absolute, but compared with other users' bandwidth

Re: PCQ

Posted: Tue Nov 20, 2007 4:29 pm
by GWISA
If you know your maximum available (as you said u do), why not use that value? It'll make your life much easier.

Otherwise you can just set a queue with child queues and different priorities... not so sure this will work so well though... I've never used a queue without setting max-limit and limit-at...

If you use values in max-limit and limit-at, you will achieve exactly what you want, and be able to define 'dynamic' behaviour.


Do not set a rate limit in the 'queue types', so you still set type=pcq

max-limit and limit-at will define how much bandwidth is available to divide amongst your PCQ users, and if you define different classes in different child queues attached to the same parent, the you can set max-limit equal on ALL queues, but limit-at at different rates.

So, to describe in visual terms:

Parent (main): max-limit=10Mb
VIP-queue: parent=main, max-limit=10Mbps, limit-at=3Mbps, priority=1, packet-mark=VIP
Normal-queue: parent=main, max-limit=10Mbps, limit-at=7Mbps, priority=2

This will give 10Mbps to any user who is the only one using the gateway. When user 2 logs on, it will divide by 2, giving 5Mbps.

As more and more users come online, it will divide further and further until the full 10Mbps is being used, then 'limit at' starts kicking in to allocate bandwidth availability between classes.

Any users with packet-mark=VIP will go in the queue VIP-queue.

If for some reason your 10Mbps upstream bandwidth becomes 7Mbps total and the users are drawing more than this, then VIP-queue wil still get 3Mbps total available, but normal-queue wil shrink to 4Mbps due to lower priority...