[LARTC] Linux Qos : PRIO qdisc works

2006-06-21 Thread Sangho Lee

Hi, all

I am interested in Linux related QoS, especially PRIO queue discipline (qdisc).

I test some experiments about PRIO qdisc.

Host A --  Router A --- Router B --- Host C
|  1Gbps   |
Host B -+  + Host D

flow 1 : Host A - Host C (TCP)
flow 2 : Host B - Host D (UDP)

priority 1 queue (pfifo, size 1000 packets ) : flow 1
priority 2 queue (pfifo, size 1000 packets ) : flow 2
priority 3 queue (pfifo, size 1000 packets ) : defaults

I configured PRIO qdisc on Router A's outer interface to Router B.

the results of test
- TCP throughput about  80Mbps
- UDP throughput about 900Mbps. (UDP try to send 1Gbps)


First question:
The TCP stream with higher priority than UDP stream with lower priority
experienced starvation in stead of UDP stream. Is it correct?

Did you test PRIO qdisc with TCP having high priority and UDP having low 
priority?

In the below, there is my configuration. Is there something wrong?

Second Question:
When I test with one TCP stream having high priority and one TCP stream having
low priority, the throughput of each TCP stream is about 500Mbps.
When I increase the number of TCP stream, the TCP streams having high priority
have more bandwidth than TCP streams with low priority. (see below,B.TCP vs TCP)
Is it correct?

Thanks in advance,
Sincerely,
Sangho Lee

--
A. My Configuration

tc qdisc add dev eth1 root handle 1: prio bands 3 priomap 2 2 2 2 2 2 2 2 2 2 2
2 2 2 2 2

tc qdisc add dev eth1 parent 1:1 handle 10: pfifo
tc qdisc add dev eth1 parent 1:2 handle 20: pfifo
tc qdisc add dev eth1 parent 1:3 handle 30: pfifo

 tc filter add dev eth1 parent 1: protocol ip prio 1 u32 match ip src
134.77.1.151/32 match ip dst 134.75.1.151/32 flowid 1:1

 tc filter add dev eth1 parent 1: protocol ip prio 2 u32 match ip src
134.78.1.151/32 match ip dst 134.76.1.151/32 flowid 1:2


B. TCP vs TCP
 1) 1 stream : 462 vs 415 Mbps
 2) 3 streams : 465 vs 482 Mbps
 3) 10 streams : 477 vs 461 Mbps
 4) 30 streams : 76 vs 864 Mbps
 5) 100 streams : 35.3 vs 911 Mbps


___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] Re: Linux Qos : PRIO qdisc works

2006-06-21 Thread Jarek Poplawski

Sangho Lee wrote:

Hi, all

I am interested in Linux related QoS, especially PRIO queue discipline (qdisc).

...

First question:
The TCP stream with higher priority than UDP stream with lower priority
experienced starvation in stead of UDP stream. Is it correct?

...

All correct: man tc-prio:

BUGS
Large amounts of traffic in the lower bands can cause starvation 
of higher bands. Can be prevented by attaching a shaper (for 
example, tc-tbf(8) to these bands to make sure they cannot 
dominate the link.


Jarek P.

___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] Egress shaping recommendations (based on source ip)

2006-06-21 Thread Ray Van Dolson
I'm trying to set up customer egress shaping on concentrator that customers
connect to using pptp (which uses pppd).  This means customers each have a
pppXXX interface when they connect.  It's easy to shape their down speed
this way, and when they disconnect the interface is gone and thus the
shaping rules automatically go away as well.

However, shaping their upload (traffic that forwards from their ppp
interface and out the ethernet interface on the server) is a different
matter and I'm trying to figure out the best way to do it.

I was planning to do this with CBQ... initially I created a root qdisc with
the full Ethernet bandwidth available.

I created two classes below that, one with the full bandwidth available, and
one with only 9Mbps available (internet bandwidth we have at this site).

To the 9Mbps class, I want to attach child classes limited to the rate plan
each customer is assigned.  These classes should be created when the
customer connects, and removed when they disconnect.  I will create a filter
based on ip src and point to the appropriate class for each customer.

The problem I'm running into is that when I customer disconnects, I cannot
find a clean way to remove their associated classes and filters.  I would
like to be able to do simply delete the class I created for them and have
all the attached filters automatically removed as well... kind of like how
you can delete the root qdisc and everything below is removed automatically.

However, this doesn't seem to work.  You have to delete the filters first
before removing any classes.

Instead of using classes should I be looking at using child qdisc's and
attaching filters directly to those (if that can be done)?

Just trying to avoid a situation on a busy server where a tc command fails
and I'm left with stale filters and classes.

Ray
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] iptables acknoledgment match

2006-06-21 Thread Sebastián A . Aresca

Hi:
   Anybody have the iptables line to match ack?

iptables -t mangle -A QoS_Test -p tcp --tcp-flags SYN,RST,ACK ACK -m 
length --length :128


I try this but it's not working for me.

Best regards.

Sebastián A. Aresca 




___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc