Hello, I want to set up typical scenario: entire bandwith (128kbps from ISP) to devide to 2 parts: 1\traffic from special source IP address 2\ rest Each part should be capable of "borrowing" from the other in case of less traffic on either side. I set up according to the HTB manual using a u32 filter and all packets are properly divided according to the filter to classes ("Sent" bytes in stats increases). But the "borrowing" doesn''t work. I started 3 FTP sessions: 1 from the special IP address, 2 from other places. The 128k bandwitdth is not allocated in the right ratio according to HTB config but 1/2 as poor TCP sessions. If I set up rate=ceil (no borrowing) it works OK-every class has got the right part of bandwidth. It''s Linux router, kernel 2.4.16, eth2 is interface to internal firewall, Can you tell me what''s wrong? Does anybody successfully use scenario with "borrowing" ? If yes, please, send me a script or info? Thanks Lumir Unzeitig HTB config ******************* BURST=2 BAND=128 #kbps ISP bandwidth BAND1=10 #kbps download from odysseus.fi.muni.cz BAND2=$(($BAND-$BAND1)) #rest #Root handle qdisc #***************** tc qdisc add dev eth2 root handle 1: htb default 200 #Root class for 128kbps #********************** tc class add dev eth2 parent 1: classid 1:1 htb \ rate ${BAND}kbit ceil ${BAND}kbit burst 2k #Subclass 1:100 download from odysseus.fi.muni.cz #------------------------------------------------------------------------- #Subclass definition tc class add dev eth2 parent 1:1 classid 1:100 htb \ rate ${BAND1}kbit ceil ${BAND}kbit burst ${BURST}kbit #Filter tc filter add dev eth2 parent 1: protocol ip prio 1 u32 match ip src 147.251.48.205/32 flowid 1:100 #qdisc - SFQ tc qdisc add dev eth2 parent 1:100 handle 1000: sfq perturb 10 #Subclass 1:200 - rest #-------------------------------- #Subclass definition tc class add dev eth2 parent 1:1 classid 1:200 htb \ rate ${BAND2}kbit ceil ${BAND}kbit burst ${BURST}k #qdisc - SFQ tc qdisc add dev eth2 parent 1:200 handle 2000: sfq perturb 10 ************************ HTB stats ***************** ---[ eth2: queueing disciplines ]------------------------- qdisc sfq 2000: quantum 1514b limit 128p flows 128/1024 perturb 10sec Sent 7383739 bytes 8792 pkts (dropped 0, overlimits 0) qdisc sfq 1000: quantum 1514b limit 128p flows 128/1024 perturb 10sec Sent 3301615 bytes 2285 pkts (dropped 0, overlimits 0) qdisc htb 1: r2q 10 default 200 dcache 0 deq_util 1/1000000 deq_rate 23 trials_per_deq 1 dcache_hits 0 direct_packets 0 Sent 10685354 bytes 11077 pkts (dropped 0, overlimits 0) ---[ eth2: configured classes ]--------------------------- class htb 1:1 root prio 0 rate 128Kbit ceil 128Kbit burst 2Kb/8 mpu 0b cburst 1762b/8 mpu 0b quantum 1638 level 3 Sent 10686868 bytes 11078 pkts (dropped 0, overlimits 0) rate 14044bps 10pps lended: 2017 borrowed: 0 giants: 0 injects: 0 tokens: 26801 ctokens: 12550 class htb 1:100 parent 1:1 leaf 1000: prio 0 rate 10Kbit ceil 128Kbit burst 2Kb/8 mpu 0b cburst 1762b/8 mpu 0b quantum 128 level 0 Sent 3301615 bytes 2285 pkts (dropped 0, overlimits 0) rate 4393bps 2pps lended: 500 borrowed: 1785 giants: 0 injects: 0 tokens: -829440 ctokens: 12550 class htb 1:200 parent 1:1 leaf 2000: prio 0 rate 118Kbit ceil 128Kbit burst 2Kb/8 mpu 0b cburst 1762b/8 mpu 0b quantum 1510 level 0 Sent 7385253 bytes 8793 pkts (dropped 0, overlimits 0) rate 9658bps 8pps lended: 8561 borrowed: 232 giants: 0 injects: 0 tokens: 11514 ctokens: 12550 ---[ eth2: filters for classes ]--------------------------- filter parent 1: protocol ip pref 1 u32 filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1 filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:100 match 93fb30cd/ffffffff at 12 ********************
Hi it seems as if there is something other throttling the data - is not it the case that you tested the downloads thru your 128k internet connection ? If yes then throttling is done at other side of line. The try to set BAND to 110k for example ... devik On Sun, 14 Apr 2002, Lumir Unzeitig wrote:> Hello, > > I want to set up typical scenario: > entire bandwith (128kbps from ISP) to devide to 2 parts: > 1\traffic from special source IP address > 2\ rest > Each part should be capable of "borrowing" from the other in case of less > traffic on either side. > > > I set up according to the HTB manual using a u32 filter and all packets are > properly divided according to the filter to classes ("Sent" bytes in stats > increases). > But the "borrowing" doesn''t work. I started 3 FTP sessions: 1 from the > special IP address, 2 from other places. The 128k bandwitdth is not > allocated in the right ratio according to HTB config but 1/2 as poor TCP > sessions. > If I set up rate=ceil (no borrowing) it works OK-every class has got the > right part of bandwidth. > > It''s Linux router, kernel 2.4.16, eth2 is interface to internal firewall, > > Can you tell me what''s wrong? > Does anybody successfully use scenario with "borrowing" ? If yes, please, > send me a script or info? > > Thanks > > > Lumir Unzeitig > > > > HTB config > ******************* > BURST=2 > BAND=128 #kbps ISP bandwidth > BAND1=10 #kbps download from odysseus.fi.muni.cz > BAND2=$(($BAND-$BAND1)) #rest > > #Root handle qdisc > #***************** > tc qdisc add dev eth2 root handle 1: htb default 200 > > #Root class for 128kbps > #********************** > tc class add dev eth2 parent 1: classid 1:1 htb \ > rate ${BAND}kbit ceil ${BAND}kbit burst 2k > > > #Subclass 1:100 download from odysseus.fi.muni.cz > > #------------------------------------------------------------------------- > #Subclass definition > tc class add dev eth2 parent 1:1 classid 1:100 htb \ > rate ${BAND1}kbit ceil ${BAND}kbit burst ${BURST}kbit > #Filter > tc filter add dev eth2 parent 1: protocol ip prio 1 u32 match ip src > 147.251.48.205/32 flowid 1:100 > > #qdisc - SFQ > tc qdisc add dev eth2 parent 1:100 handle 1000: sfq perturb 10 > > > #Subclass 1:200 - rest > #-------------------------------- > #Subclass definition > tc class add dev eth2 parent 1:1 classid 1:200 htb \ > rate ${BAND2}kbit ceil ${BAND}kbit burst ${BURST}k > > #qdisc - SFQ > tc qdisc add dev eth2 parent 1:200 handle 2000: sfq perturb 10 > ************************ > > > HTB stats > ***************** > ---[ eth2: queueing disciplines ]------------------------- > > qdisc sfq 2000: quantum 1514b limit 128p flows 128/1024 perturb 10sec > Sent 7383739 bytes 8792 pkts (dropped 0, overlimits 0) > > qdisc sfq 1000: quantum 1514b limit 128p flows 128/1024 perturb 10sec > Sent 3301615 bytes 2285 pkts (dropped 0, overlimits 0) > > qdisc htb 1: r2q 10 default 200 dcache 0 > deq_util 1/1000000 deq_rate 23 trials_per_deq 1 > dcache_hits 0 direct_packets 0 > Sent 10685354 bytes 11077 pkts (dropped 0, overlimits 0) > > ---[ eth2: configured classes ]--------------------------- > class htb 1:1 root prio 0 rate 128Kbit ceil 128Kbit burst 2Kb/8 mpu 0b > cburst 1762b/8 mpu 0b quantum 1638 level 3 > Sent 10686868 bytes 11078 pkts (dropped 0, overlimits 0) > rate 14044bps 10pps > lended: 2017 borrowed: 0 giants: 0 injects: 0 > tokens: 26801 ctokens: 12550 > > class htb 1:100 parent 1:1 leaf 1000: prio 0 rate 10Kbit ceil 128Kbit burst > 2Kb/8 mpu 0b cburst 1762b/8 mpu 0b quantum 128 level 0 > Sent 3301615 bytes 2285 pkts (dropped 0, overlimits 0) > rate 4393bps 2pps > lended: 500 borrowed: 1785 giants: 0 injects: 0 > tokens: -829440 ctokens: 12550 > > class htb 1:200 parent 1:1 leaf 2000: prio 0 rate 118Kbit ceil 128Kbit burst > 2Kb/8 mpu 0b cburst 1762b/8 mpu 0b quantum 1510 level 0 > Sent 7385253 bytes 8793 pkts (dropped 0, overlimits 0) > rate 9658bps 8pps > lended: 8561 borrowed: 232 giants: 0 injects: 0 > tokens: 11514 ctokens: 12550 > > > ---[ eth2: filters for classes ]--------------------------- > > filter parent 1: protocol ip pref 1 u32 > filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1 > filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800 > bkt 0 flowid 1:100 > match 93fb30cd/ffffffff at 12 > > ******************** > > _______________________________________________ > LARTC mailing list / LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ > >
Lumir Unzeitig
2002-Apr-18 13:33 UTC
RE: HTB-link sharing (borrowing) doesn''t work - partially solved
Thanks for your help, it''s working with 110k for entire bandwidth and fluent downloading via ftp. In real environment, one of the 2 classes is for terminal connections (Citrix-ICA protocol), therefore the load is not stepless and getting in ballance (according to classes) is not quick enough(= it''s in my opinion, no practice tests). Shall I speed up the time by any change in config script (different qdisc, smaller burst,....)? Thanks Lumir Unzeitig Hi it seems as if there is something other throttling the data - is not it the case that you tested the downloads thru your 128k internet connection ? If yes then throttling is done at other side of line. The try to set BAND to 110k for example ... devik On Sun, 14 Apr 2002, Lumir Unzeitig wrote:> Hello, > > I want to set up typical scenario: > entire bandwith (128kbps from ISP) to devide to 2 parts: > 1\traffic from special source IP address > 2\ rest > Each part should be capable of "borrowing" from the other in case of less > traffic on either side. > > > I set up according to the HTB manual using a u32 filter and all packetsare> properly divided according to the filter to classes ("Sent" bytes in stats > increases). > But the "borrowing" doesn''t work. I started 3 FTP sessions: 1 from the > special IP address, 2 from other places. The 128k bandwitdth is not > allocated in the right ratio according to HTB config but 1/2 as poor TCP > sessions. > If I set up rate=ceil (no borrowing) it works OK-every class has got the > right part of bandwidth. > > It''s Linux router, kernel 2.4.16, eth2 is interface to internal firewall, > > Can you tell me what''s wrong? > Does anybody successfully use scenario with "borrowing" ? If yes, please, > send me a script or info? > > Thanks > > > Lumir Unzeitig > > > > HTB config > ******************* > BURST=2 > BAND=128 #kbps ISP bandwidth > BAND1=10 #kbps download from odysseus.fi.muni.cz > BAND2=$(($BAND-$BAND1)) #rest > > #Root handle qdisc > #***************** > tc qdisc add dev eth2 root handle 1: htb default 200 > > #Root class for 128kbps > #********************** > tc class add dev eth2 parent 1: classid 1:1 htb \ > rate ${BAND}kbit ceil ${BAND}kbit burst 2k > > > #Subclass 1:100 download from odysseus.fi.muni.cz > > #------------------------------------------------------------------------- > #Subclass definition > tc class add dev eth2 parent 1:1 classid 1:100 htb \ > rate ${BAND1}kbit ceil ${BAND}kbit burst${BURST}kbit> #Filter > tc filter add dev eth2 parent 1: protocol ip prio 1 u32 match ip src > 147.251.48.205/32 flowid 1:100 > > #qdisc - SFQ > tc qdisc add dev eth2 parent 1:100 handle 1000: sfq perturb 10 > > > #Subclass 1:200 - rest > #-------------------------------- > #Subclass definition > tc class add dev eth2 parent 1:1 classid 1:200 htb \ > rate ${BAND2}kbit ceil ${BAND}kbit burst ${BURST}k > > #qdisc - SFQ > tc qdisc add dev eth2 parent 1:200 handle 2000: sfq perturb 10 > ************************ > > > HTB stats > ***************** > ---[ eth2: queueing disciplines ]------------------------- > > qdisc sfq 2000: quantum 1514b limit 128p flows 128/1024 perturb 10sec > Sent 7383739 bytes 8792 pkts (dropped 0, overlimits 0) > > qdisc sfq 1000: quantum 1514b limit 128p flows 128/1024 perturb 10sec > Sent 3301615 bytes 2285 pkts (dropped 0, overlimits 0) > > qdisc htb 1: r2q 10 default 200 dcache 0 > deq_util 1/1000000 deq_rate 23 trials_per_deq 1 > dcache_hits 0 direct_packets 0 > Sent 10685354 bytes 11077 pkts (dropped 0, overlimits 0) > > ---[ eth2: configured classes ]--------------------------- > class htb 1:1 root prio 0 rate 128Kbit ceil 128Kbit burst 2Kb/8 mpu 0b > cburst 1762b/8 mpu 0b quantum 1638 level 3 > Sent 10686868 bytes 11078 pkts (dropped 0, overlimits 0) > rate 14044bps 10pps > lended: 2017 borrowed: 0 giants: 0 injects: 0 > tokens: 26801 ctokens: 12550 > > class htb 1:100 parent 1:1 leaf 1000: prio 0 rate 10Kbit ceil 128Kbitburst> 2Kb/8 mpu 0b cburst 1762b/8 mpu 0b quantum 128 level 0 > Sent 3301615 bytes 2285 pkts (dropped 0, overlimits 0) > rate 4393bps 2pps > lended: 500 borrowed: 1785 giants: 0 injects: 0 > tokens: -829440 ctokens: 12550 > > class htb 1:200 parent 1:1 leaf 2000: prio 0 rate 118Kbit ceil 128Kbitburst> 2Kb/8 mpu 0b cburst 1762b/8 mpu 0b quantum 1510 level 0 > Sent 7385253 bytes 8793 pkts (dropped 0, overlimits 0) > rate 9658bps 8pps > lended: 8561 borrowed: 232 giants: 0 injects: 0 > tokens: 11514 ctokens: 12550 > > > ---[ eth2: filters for classes ]--------------------------- > > filter parent 1: protocol ip pref 1 u32 > filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1 > filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800 > bkt 0 flowid 1:100 > match 93fb30cd/ffffffff at 12 > > ******************** > > _______________________________________________ > LARTC mailing list / LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ > >_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Martin Devera
2002-Apr-18 19:35 UTC
RE: HTB-link sharing (borrowing) doesn''t work - partially solved
Getting in ballance should be very quick. The decision is made ASAP the hi prio packet is ready. Don''t forget to set lower prio number for your Citrix class. devik> Thanks for your help, > it''s working with 110k for entire bandwidth and fluent downloading via ftp. > > In real environment, one of the 2 classes is for terminal connections > (Citrix-ICA protocol), therefore the load is not stepless and getting in > ballance (according to classes) is not quick enough(= it''s in my opinion, no > practice tests). > > Shall I speed up the time by any change in config script (different qdisc, > smaller burst,....)? > > Thanks > Lumir Unzeitig > > > Hi it seems as if there is something other throttling > the data - is not it the case that you tested the downloads > thru your 128k internet connection ? If yes then throttling is > done at other side of line. The try to set BAND to 110k for > example ...