Vadtec wrote:
MAX_RATE='360kbit'
MAX_RATEA='360'
INGRESS_RATE='1400kbit'
If you actuakky sync at 1.5/384kbit these are far too close as DSL sync
rates are at atm level. It is possible to patch kernel/tc to make things
work properly, but for testing try 1000/300kbit.
$TC qdisc add dev $IFext root handle 1: htb default 20
using default on eth is not ideal as arp will go there - though sfq will
help you a bit. Don't set perturb too low as it causes packet reordering.
$TC filter add dev $IFext parent 1: protocol ip prio 10 u32 match ip
protocol 6 0xff match u8 0x05 0x0f at 0 match u16 0x0000 0xffc0 at 2
match u8 0x10 0xff at 3 flowid 1:10
This won't work - the last "at 3" should be "at 33"
General other points from some things raised in the rest of the thread -
Bittorrent will use udp if the client does trackerless/dht, but it
shouldn't amount to much bandwidth. The port settings are for listening
and don't mean you won't use others aswell.
I've noticed that if bandwidth is restriced by the bt client and your
mtu is <1500 then you can get 1 large and one small packet for every
chunk sent by the client - if you do your own QOS then turn off the
client limiter, or you could have some nasty reordering as the small
packets overtake the large ones (depending on what rules you end up using)
Ingress shaping is different from egress - you have to sacrifice
bandwidth to get it to work, though. I don't know why in your test
latency for ssh lagged when you reached 20KB/sec upload - maybe you need
to look at counters/tcpdump to be sure your client sets TOS OK. As there
is a rule for ICMP you can ping somewhere to see how much lag you are
getting.
You are right that you can shape your ingress as egress on the LAN
facing interface, but you need to make allowances for the fact you are
shaping from the wrong end of the bottleneck. Until you've got egress
sorted I would stick to policing ingress eth0 downto 1mbit while testing.
One more possibility - if you have a multicore CPU then kernel should be
set to use get time of day or jiffies as a time source for shaping not
cpu/tsc.
If you have gig nics then there may be other things needed - but only
for traffic generated on the shaping box its self - I assume your
torrent box is on a machine on the LAN?
Andy.
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc