Skip to contentSkip to conversation

Latency in SFQ

LARTC Adi Nugroho 3 participants 5 messages Dec 18, 2001

lore
Share & tools
lore
#0 lore raw

Dear all...

If we are using TBF, we can reduce "buffer" and "limit" to minimize latency. What should we do in SFQ?

I tried to use SFQ, but the latency goes up to 10.000 to 20.000 milisecond in case of overloaded.

Can someone help me?

I'm using cbq.init, and here is my configuration:

Parent class:
DEVICE=eth0,10Mbit,1Mbit
RATEdKbit
WEIGHT=6.4Kbit
PRIO=5
LEAF=tbf
BUFFER000
LIMIT000
BOUNDED=yes
ISOLATED=no

In child class:
DEVICE=eth0,10Mbit,1Mbit
RATEKbit
WEIGHT=1.6Kbit
PRIO=5
PARENT00
LEAF=sfq
BOUNDED=no
ISOLATED=no
PERTURB=5
QUANTUM000
RULE.0.0.201

Regards,
Adi Nugroho

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

#1 lore raw
Quoted 4 lines · Adi Nugroho

Dear all...

If we are using TBF, we can reduce "buffer" and "limit" to minimize latency. What should we do in SFQ?

You can't really. SFQ has a fixed queue length of 128.

Quoted 2 lines

I tried to use SFQ, but the latency goes up to 10.000 to 20.000 milisecond in case of overloaded.

SFQ is no substitute for prioritization, but this is ridiculous. Can you show the output of cbq.init? You can do this by looking into the script and turning the logfile on.

I think cbq.init is misconfiguring things.

Regards,

bert

Signature · 8 lines
http://www.PowerDNS.com          Versatile DNS Software & Services
http://www.tk                              the dot in .tk
Netherlabs BV / Rent-a-Nerd.nl           - Nerd Available -
Linux Advanced Routing & Traffic Control: http://ds9a.nl/lartc

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/
#2 lore raw
In reply to Adi Nugroho
Quoted 8 lines
Quoted 2 lines

I tried to use SFQ, but the latency goes up to 10.000 to 20.000 milisecond in case of overloaded.

SFQ is no substitute for prioritization, but this is ridiculous. Can you show the output of cbq.init? You can do this by looking into the script and turning the logfile on.

I think cbq.init is misconfiguring things.

When I started with TC, I also tried the cbq.init script. It's very limited in what you can do. Once you know TC, you will realize that cbq.init is too limited and that's doing some things wrong because the situation is much more complicated.

An example. You can select tbf as a leaf qfdisc for a cbq class. But the qdisc is allready shaping, so attaching a tbf qdisc is not needed. It can disturb the setup and can result in some strange behaviour.

Stef

Signature · 8 lines
[email protected]
 More QOS info : http://docum.org/
 Title : "Using Linux as bandwidth manager"
     

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/
#3 lore raw
In reply to Adi Nugroho
Quoted 3 lines · bert hubert

I think cbq.init is misconfiguring things.

Dear Sir,

As your suggestion, I have made all rule by hand.
Bellow are my script, one for cbq (tbf+sfq), and one for htb (+sfq)

But the latency was still so high (sometimes more than 20.000 ms if overloaded)

From statistic, the overlimit packet is high, but there is no dropped packet

Thank you for your help.

Regards,
Adi Nugroho

========Script for cbq (tbf+sfq) ========dev=eth1
DEVBWDTMbit
DEVWGHT=1Mbit
tc qdisc del dev eth1 root
tc qdisc add dev $dev root handle 1:0 cbq\
bandwidth $DEVBWDT avpkt 1000 cell 8
tc class add dev $dev parent 1:0 classid 1:1 cbq \

                bandwidth $DEVBWDT rate $DEVBWDT weight $DEVWGHT \
                prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000

#parent class
tc class add dev eth1 parent 1:1 classid 1:64 cbq \
bandwidth 10Mbit rate 64Kbit weight 6.4Kbit prio 8\
allot 1514 cell 8 maxburst 20 avpkt 1000 bounded
tc qdisc add dev eth1 parent 1:64 tbf \

                rate 64Kbit buffer 3000 limit 3000

#Child class #1
tc class add dev eth1 parent 1:64 classid 1:164 cbq \

        bandwidth 10Mbit rate 16Kbit weight 1.6Kbit prio 5 \
        allot 1514 cell 8 maxburst 20 avpkt 1000

tc qdisc add dev eth1 parent 1:164 sfq \
perturb 5 quantum 4500

tc filter add dev eth1 parent 1:0 protocol ip \

                prio 100 u32 match ip dst 10.0.0.222 flowid 1:164

#Child class #2
tc class add dev eth1 parent 1:64 classid 1:264 cbq \

        bandwidth 10Mbit rate 16Kbit weight 1.6Kbit prio 5 \
        allot 1514 cell 8 maxburst 20 avpkt 1000

tc qdisc add dev eth1 parent 1:264 sfq \
perturb 5 quantum 4500

tc filter add dev eth1 parent 1:0 protocol ip \

                prio 100 u32 match ip dst 10.0.0.73 flowid 1:264

#Child class #3
tc class add dev eth1 parent 1:64 classid 1:364 cbq \

        bandwidth 10Mbit rate 16Kbit weight 1.6Kbit prio 5 \
        allot 1514 cell 8 maxburst 20 avpkt 1000

tc qdisc add dev eth1 parent 1:364 sfq \
perturb 5 quantum 4500

tc filter add dev eth1 parent 1:0 protocol ip \

                prio 100 u32 match ip dst 10.0.0.30 flowid 1:364

===========Script for htb (+sfq) ===========tc qdisc add dev eth1 root handle 1: htb

tc class add dev eth1 parent 1: classid 1:1 htb rate 64Kbit burst 15k

tc class add dev eth1 parent 1:1 classid 1:10 htb rate 16Kbit ceil 64Kbit burst 15k
tc class add dev eth1 parent 1:1 classid 1:20 htb rate 16Kbit ceil 64Kbit burst 15k
tc class add dev eth1 parent 1:1 classid 1:30 htb rate 16Kbit ceil 64Kbit burst 15k

tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10 tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10 tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10

u32="tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32"

$u32 match ip dst 10.0.0.222 flowid 1:10
$u32 match ip dst 10.0.0.73 flowid 1:20
$u32 match ip dst 10.0.0.30 flowid 1:30

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

#4 lore raw
In reply to Adi Nugroho
Quoted 5 lines · Adi Nugroho
Quoted 3 lines · bert hubert

I think cbq.init is misconfiguring things.

Quoted 7 lines

Dear Sir,

As your suggestion, I have made all rule by hand.
Bellow are my script, one for cbq (tbf+sfq), and one for htb (+sfq)

But the latency was still so high (sometimes more than 20.000 ms if overloaded)

Lower maxburst for cbq and burst for htb.

Quoted 2 lines

tc class add dev eth1 parent 1:1 classid 1:10 htb rate 16Kbit ceil 64Kbit burst 15k

15k is ~8 seconds!

Regards,

bert

Signature · 8 lines
http://www.PowerDNS.com          Versatile DNS Software & Services
http://www.tk                              the dot in .tk
Netherlabs BV / Rent-a-Nerd.nl           - Nerd Available -
Linux Advanced Routing & Traffic Control: http://ds9a.nl/lartc

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