Friday, August 25, 2006

PF HFSC part II

# hfsc part 2 #
###############
Monday, February 16, 2004, 6:43:48 PM, Kenjiro Cho wrote:

>you can do the following:
>queue Q1 bandwidth 0% hfsc (realtime 32Kb, linkshare 0%)
>bandwidth for Q1 invalid (0 / 0)
>./pf.conf:xx: errors in queue definition
>oops! the bandwidth check is a bit too strict.
>the patch at the end of this mail should fix it.
yeah...

>but, again, this isn't the right solution for you since you don't need
>any realtime guarantee.
why not? it is just a way to specify initial bandwidth for queue. no?

>setting both realtime and linkshare to 0 means that 0bps is assined to
>the queue. then, the queue will get nothing.
i don't want to realtime==0 and linkshare==0 :) the goal is to construct some queues what have no ability to receive excess bandwidth (linkshare==0).

for example :
altq on fxp0 bandwidth 256Kb hfsc queue {Q1,Q2,Q3}
# guarantee and don't try to borrow for Q1 and Q2
queue Q1 hfsc (realtime 32Kb linkshare 0%)
queue Q2 hfsc (realtime 32Kb linkshare 0%)

# guarantee, borrow the rest, plus some from Q1 and Q2 if avail
queue Q3 hfsc (realtime 64Kb linkshare 100% default)

#equivalent to cbq's
altq on fxp0 bandwidth 256Kb cbq queue {Q1,Q2,Q3}
queue Q1 bandwidth 32Kb cbq
queue Q2 bandwidth 32KB cbq
queue Q3 bandwidth 64Kb cbq (borrow default)

#but as far as i understood from our discussion, the
altq on fxp0 bandwidth 256Kb hfsc queue {Q1,Q2,Q3}
queue Q1 hfsc (linkshare 33% upperlimit 32Kb)
queue Q2 hfsc (linkshare 33% upperlimit 32Kb)
queue Q3 hfsc (linkshare 33% upperlimit 64Kb default)

will do almost the same, but not the same: first will guarantee
Q1 and Q2 their bandwidth, second - will not, but will in case of
appropriate handcrafted value for Q3's upperlimit or when Q3 is not
saturated enough. additionally, you need to handcraft linkshare's
values. complete dizzy :)

so the first example easier to construct, but the bandwidth and
linkshare misunderstanding exist (i will try your patch).

btw,
altq on fxp0 bandwidth 256Kb hfsc queue {Q1,Q2,Q3}
# guarantee and don't try to borrow for Q1 and Q2
queue Q1 hfsc (realtime 32Kb linkshare 50%)
queue Q2 hfsc (realtime 32Kb linkshare 50%)
# guarantee, borrow the rest (including from Q1 and Q2)
queue Q3 hfsc (realtime 64Kb linkshare 100% default)

parses normally, but 100+50+50 > 100 :) this is cloudy, how
scheduler deals with this...

>as for me bandwidth is bogus with hfsc...
>do you have a better idea?

make linkshare primary, not bandwidth (even in linkshare=0 case). this
is logical since original altq have no bandwidth. why
>/* if link_share is not specified, use bandwidth */
>if (opts->>lssc_m2 == 0)
>opts->>lssc_m2 = pa->bandwidth;

is needed? just assume opts->>lssc_m2 == 0 if opts->>lssc_m2 == 0
when bandwidth not specified. opts->>lssc_m2 = pa->bandwidth must
be used if only bandwidth specified.

it will not break bandwidth-aware setups, but will give more power
to non-bandwith...

0 Comments:

Post a Comment

<< Home

Click here to join IndoWLI
Click to join IndoWLI