Skip to contentSkip to conversation

can I replace sfq with wrr

LARTC Krzysztof Wittek 3 participants 3 messages Sep 2, 2002 – Sep 3, 2002

lore
Share & tools
lore
#0 lore raw

Hello,

Currently I use htb with sfq,

/sbin/tc class add dev $IFACE classid 1:0 parent 1: htb rate ${RATE0}kbit \
                        ceil ${CEIL0}kbit burst 6k prio 0

/sbin/tc qdisc add dev $IFACE parent 1:0 sfq

but it has one big "hole" - person which uses 10 tcp connections ( with download accelerator ) gets 10 times more bandwidth than normal user with one tcp session .

I want bandwidth share based on IP adresses ( MAC adresses ) not tcp sessions .

I've noticed that wrr could fix this problem.
I wonder if new kernel and iproute2 and :

/sbin/tc qdisc add dev $IFACE parent 1:0 wrr

instead of

/sbin/tc qdisc add dev $IFACE parent 1:0 sfq

is enough to do what I need ? or I need some more complex qdisc ?

Another question is if it's possible to limit bandwith like squid with delay pools ( so files smaller than eg: 2 MB are transmitted at full speed and larger files are transmitted : 0 - 2 MB full speed and anything more over 2MB is dropper do low priority class ) ?
How can I do this with ipchains ( kernel 2.2 ) + htb and iptables (kernel 2.4 ) + htb ?

Greets,

K.

Signature · 8 lines
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{ Krzysztof Wittek - Gliwice  Poland - ICQ: 6667414 - IRCNet: Krzychu }
{ [email protected] ftp://ftp.krzychu.net http://www.krzychu.net }
{ =====> IPv4://3646973238  IPv6://3ffe:8010:28:2::1 <===== }
- - KW6109-RIPE * + P-o-w-e-r-e-d b-y P-L-D L-i-n-u-x + * KW1-6BONE - -
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#1 lore raw
Quoted 8 lines · Krzysztof Wittek

/sbin/tc qdisc add dev $IFACE parent 1:0 wrr

instead of

/sbin/tc qdisc add dev $IFACE parent 1:0 sfq

is enough to do what I need ? or I need some more complex qdisc ?

In base it's almost enough, look at wrr doc for details. You can try esfq also [less powerfull than wrr but works simmilar]

tw
--

----------------
ck.eter.tym.pl

"Never let shooling disturb Your education"

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#2 lore raw
In reply to Krzysztof Wittek
Quoted 8 lines · Krzysztof Wittek

Hello,

Currently I use htb with sfq,

/sbin/tc class add dev $IFACE classid 1:0 parent 1: htb rate ${RATE0}kbit \
                        ceil ${CEIL0}kbit burst 6k prio 0

/sbin/tc qdisc add dev $IFACE parent 1:0 sfq

Class 1:0 is a special class in htb. All packets queued in this class will get pas thru as fast as possible. Try class 1:1 and it will work like you want :)

Quoted 7 lines

but it has one big "hole" - person which uses 10 tcp connections ( with download accelerator ) gets 10 times more bandwidth than normal user with one tcp session .

I want bandwidth share based on IP adresses ( MAC adresses ) not tcp sessions .

There is hacked sfq qdisc : EFSQ. You can configure it so it uses only the src and/or dst address to classify the packets and not the ports. I have a local copy on www.docum.org under FAQ.

Quoted 6 lines

Another question is if it's possible to limit bandwith like squid with delay pools ( so files smaller than eg: 2 MB are transmitted at full speed and larger files are transmitted : 0 - 2 MB full speed and anything more over 2MB is dropper do low priority class ) ?
How can I do this with ipchains ( kernel 2.2 ) + htb and iptables (kernel 2.4 ) + htb ?

I think there is a patch for iptables so you can mark packets based on the size of the file where they belong to. But I'm not sure. If it exist, you can redirect big files to a queue with lower bandwidth.

Stef

Signature · 8 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/