paxket shaping and scheduling problems

Robert Cohen (robert@apex.net.au)
Wed, 22 Dec 1999 13:55:56 +1100


I'm trying to do packet shaping and scheduling using Linux 2.2.14pre9.
I'm come across a couple of problems.

My my first attempt was just to load the TBF module

tc qdisc add dev eth0 root tbf rate 256Kbps buffer 2kB limit 10kB

However I dont seem to be able to schedule rates below about 1Mbit.
Even when set to 256Kbps, the ftp throughput was 130KB/sec.
The kernal was compiled with packet scheduling set to PSCHED_JIFFIES.
I tried PSCHED_CPU but it didnt give good results. This is on a Pentium
MMX 200. Perhaps the Pentium doesnt have a proper CPU timestamp. I'm
going to try it on a Pentium III when I get a chance.

The next problem is that I want to schedule different rates to different
IP ranges on the same physical ethernet subnet. I have the IP ranges set
up on different ethernet aliases.
I was intending to use tc on the different aliases but it only lets me
use TC on the raw interface not aliases.

Any suggestions as to how I can control traffic to different logical
subnets on the same physical subnet.

The third question is about packet scheduling.
There will be a reasonable number of TCP connections open from hosts in
a shaped subnet. Possibly 100 different IP addresses. I want to keep the
shaping fair so that I dont get starvation of some connections.
I presume that I should add some fair queuing to help achieve this.
Is the sfq module likely to give good results.

How do I load both the tbf qdisc and the sfq qdisc. I know that you use
cqb to do this, but precisely how is unclear.
Do I create a CBQ class and then load two qdiscs onto it?

I tried

tc qdisc add dev eth0 root handle 1: cbq bandwidth 10MBit avpkt 1000 mpu
64
tc class add dev eth0 parent 1:0 classid :1 est 1ec 8sec cbq bandwidth
10Mbit rate 10MBit allot 1514 maxburst 50 avpkt 1000
tc qdisc add dev eth0 parent 1:1 sfq quantum 1514b perturb 15
tc qdisc add dev eth0 parent 1:1 tbf rate 1Mbps buffer 2kB limit 10kB

but it wont let me load the second qdisc
If I create two classes and load each qdisc onto one of them then will a
packet pass through both classes or just 1 or the other?

--
Robert Cohen - Network Administrator      
Apex Internet     
robert@apex.net.au     http://www.apex.net.au
Ph (02) 6247 2000      Fax: (02) 6247 2711

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/