www.smartbusinesschoices.com

Leading Business and Technology,
News and information


Part of the Identityscape.com network...

getxfactor.com jmoodmusic.com smartbusinesschoices.com mintdepot.com lowfaresalways.com evangelicalview.com shoppingpodder.com soproudlywehail.com webnews.ws currenthumor.com

 

 

tc and PRIOMAP not working
   Smart Linux Business Choices! - the Best of UseNet Postings! Forum Index -> Linux Networking  
View previous topic :: View next topic  
Author Message
Johannes Bauer
Guest






PostPosted: Thu Nov 13, 2008 11:54 pm    Post subject: tc and PRIOMAP not working Reply with quote

Hello group,

I have the following traffic control configuration currently in my system:

tc qdisc add dev eth1 root handle 1: htb default 10

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

tc class add dev eth1 parent 1:1 classid 1:10 htb rate 768kbit ceil
1mbit burst 15k # Standard internet
tc class add dev eth1 parent 1:1 classid 1:20 htb rate 53kbit ceil 1mbit
burst 15k # Medium priority
tc class add dev eth1 parent 1:1 classid 1:30 htb rate 53kbit ceil
93kbit burst 15k # Lowest priority

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

tc filter add dev eth1 protocol ip parent 1: prio 1 handle 2 fw flowid
1:20 # Medium priority
tc filter add dev eth1 protocol ip parent 1: prio 1 handle 1 fw flowid
1:30 # Lowest priority

I today tried to modify it. Goals I already achieve:

* All connections which are unmarked go into the 1:10 class, which share
the bandwith using SFQ
* All connections marked with 1 should be limited to max. 93kbit ceiling

I want to add a third goal:

* All connection marked with 2 should get all the bandwith they need,
unless someone in 1:10 needs it. If someone in 1:10 needs it, it always
has priority and may starve mark 2 packets.

I really didn't get anything done. I tried fiddling with PRIOMAP with 2
bands, but did not get anything to work.

Could you offer me help?
Thanks,
Johannes

--
"Meine Gegenklage gegen dich lautet dann auf bewusste Verlogenheit,
verlästerung von Gott, Bibel und mir und bewusster Blasphemie."
-- Prophet und Visionär Hans Joss aka HJP in de.sci.physik
<48d8bf1d$0$7510$5402220f@news.sunrise.ch>
Back to top
Andy Furniss
Guest






PostPosted: Fri Nov 14, 2008 6:25 pm    Post subject: Re: tc and PRIOMAP not working Reply with quote

Johannes Bauer wrote:
Quote:
Hello group,

I have the following traffic control configuration currently in my system:

tc qdisc add dev eth1 root handle 1: htb default 10

Remember if you ever change things so that default is a rubbish low prio
class that arp will go here unless you filter it elsewhere.

Quote:
I want to add a third goal:

* All connection marked with 2 should get all the bandwith they need,
unless someone in 1:10 needs it. If someone in 1:10 needs it, it always
has priority and may starve mark 2 packets.

Total starvation always seems a bit harsh, maybe causing people/apps to
thing the network is broken.

Why not use the htb prio parameter on the classes and give low rates.

If you put prio 0 on 1:10 and prio 1 on 1:20 etc then any spare
bandwidth above the set rates will get shared in order.

Andy.
Back to top
Johannes Bauer
Guest






PostPosted: Sat Nov 15, 2008 3:56 pm    Post subject: Re: tc and PRIOMAP not working Reply with quote

Andy Furniss schrieb:

Quote:
* All connection marked with 2 should get all the bandwith they need,
unless someone in 1:10 needs it. If someone in 1:10 needs it, it always
has priority and may starve mark 2 packets.

Total starvation always seems a bit harsh, maybe causing people/apps to
thing the network is broken.

Why not use the htb prio parameter on the classes and give low rates.

If you put prio 0 on 1:10 and prio 1 on 1:20 etc then any spare
bandwidth above the set rates will get shared in order.

Your tip lead me to a solution which is now working marvellously. To sum
it up: I wanted to mainly reduce latency when people are downloading
large amounts of bulk data and I'm doing some ssh stuff. So the bulk
transfers now go into the low-priority queue und the ssh into the
high-priority, with the "prio" keyword and HTB, just as you suggested. I
had to fiddle with the leaf node, however: They were all configured to
use SFQ, which was a desaster for latency. Now the high prio queue is
using SFQ and all the low-priorirty queues are using pfifo with a queue
size of 1 (increasing this significantly increases delay, too).

Thanks a lot for your hint!
Regards,
Johannes

--
"Meine Gegenklage gegen dich lautet dann auf bewusste Verlogenheit,
verlästerung von Gott, Bibel und mir und bewusster Blasphemie."
-- Prophet und Visionär Hans Joss aka HJP in de.sci.physik
<48d8bf1d$0$7510$5402220f@news.sunrise.ch>
Back to top
Andy Furniss
Guest






PostPosted: Sun Nov 16, 2008 8:50 pm    Post subject: Re: tc and PRIOMAP not working Reply with quote

Johannes Bauer wrote:

Quote:
Your tip lead me to a solution which is now working marvellously. To sum
it up: I wanted to mainly reduce latency when people are downloading
large amounts of bulk data and I'm doing some ssh stuff. So the bulk
transfers now go into the low-priority queue und the ssh into the
high-priority, with the "prio" keyword and HTB, just as you suggested. I
had to fiddle with the leaf node, however: They were all configured to
use SFQ, which was a desaster for latency. Now the high prio queue is
using SFQ and all the low-priorirty queues are using pfifo with a queue
size of 1 (increasing this significantly increases delay, too).

Hmm, seems like something else is wrong and giving a 1 queue size is
just masking it.

It could just be that you have the rates set too high, often because of
overheads you need to back off from what you think the rate for your
line is.

If it's dsl with recent kernels there are ways to do things properly to
account for atm. I still patch tc to achieve the same result. What you
need to do depends on the wan you have, and if dsl the way you connect
(eg. pppoa/pppoe/bridged etc) as they all have different overheads.
Back to top
Display posts from previous:   
   Smart Linux Business Choices! - the Best of UseNet Postings! Forum Index -> Linux Networking  
Page 1 of 1
All times are GMT

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum