Hello, thanks Andreas, I reconfigured HTB to get your suggested hierarhy: AK> 1: HTB Qdisc AK> | AK> \--- 1:2 HTB root class (100000Kbit:100000kbit) AK> | AK> \--- 1:2000 HTB leaf class (50000Kbit:100000Kbit) #local AK> | AK> \--- 1:3000 HTB parent class (2048Kbit:2048Kbit) AK> | AK> \--- 1:3010 HTB leaf class (64000bit:256000bit) #ctrl AK> \--- 1:3020 HTB leaf class (128000bit:768000bit) #other AK> \--- 1:3030 HTB leaf class (512000bit:2048Kbit) #www AK> \--- 1:5040 HTB leaf class (386000bit:386000bit) #p2p tc -d class show dev eth0 class htb 1:2 root rate 100000Kbit ceil 100000Kbit burst 51587b/8 mpu 0b overhead 0b cburst 51587b/8 mpu 0b overhead 0b level 7 # local: class htb 1:2000 parent 1:2 leaf 2000: prio 0 quantum 200000 rate 50000Kbit ceil 100000Kbit burst 26593b/8 mpu 0b overhead 0b cburst 51587b/8 mpu 0b overhead 0b level 0 # root for internet trafic class htb 1:3000 parent 1:2 rate 2048Kbit ceil 2048Kbit burst 2623b/8 mpu 0b overhead 0b cburst 2623b/8 mpu 0b overhead 0b level 6 # "ctrl" class class htb 1:3010 parent 1:3000 leaf 3010: prio 1 quantum 1000 rate 64000bit ceil 256000bit burst 1631b/8 mpu 0b overhead 0b cburst 1727b/8 mpu 0b overhead 0b level 0 # "other" class class htb 1:3020 parent 1:3000 leaf 3020: prio 2 quantum 1600 rate 128000bit ceil 768000bit burst 1663b/8 mpu 0b overhead 0b cburst 1983b/8 mpu 0b overhead 0b level 0 # "www" class class htb 1:3030 parent 1:3000 leaf 3030: prio 3 quantum 12800 rate 1024Kbit ceil 2048Kbit burst 2111b/8 mpu 0b overhead 0b cburst 2623b/8 mpu 0b overhead 0b level 0 # "p2p" class class htb 1:5040 parent 1:3000 leaf 5040: prio 4 quantum 1600 rate 128000bit ceil 256000bit burst 1663b/8 mpu 0b overhead 0b cburst 1727b/8 mpu 0b overhead 0b level 0 Sorry to say, results are not as expected. I made new measurements, please see following picture (based on HTB config above): http://elusion.sk/visual_inet_6.png Point A - until now, "p2" clas had CEIL 386 kbit. Now, I reset "p2p" class CEIL to 2048 kbit. As you can see, "p2p" rised as expected Point B - "www" class RATE-CEIL is 512-2048 kbit, "p2p" class RATE-CEIL is 128-2048 kbit. PROBLEM: why did not "www" get more capacity? Point C - "www" class RATE-CEIL is 1536-2048 kbit, "p2p" class RATE-CEIL is 128-2048 kbit. PROBLEM: RATE of "www" is 1536, but class did not get this capacity; "p2p" should fall to it's RATE 256 kbit Point D - "www" class RATE-CEIL is 1024-2048 kbit, "p2p" class RATE-CEIL is 128-2048 kbit - no change Point E - "www" class RATE-CEIL is 1024-2048 kbit, "p2p" class RATE-CEIL is 128-256 kbit - as expected: "p2p" is bounded to 256 kbit limit, so the rest of the capacity was used by "www" class I have expected that in points B, C and D, "p2p" class falls down to it's specified rate and "www" gets most of the capacity. But this is not happening - "p2p" will not fall down Any other things to test, please? Best regards, B. Gereg mailto:qwerty@xxxxxxxxxx -----Originalna sprava----- Od: Andreas Klauer [mailto:Andreas.Klauer@xxxxxxxxxxxxxx] Poslane: Tuesday, February 21, 2006, 8:52:49 AM Komu: qwerty@xxxxxxxxxx Predmet: HTB, strange capacity distribution AK> On Tue, Feb 21, 2006 at 12:49:59AM +0100, Boris Gereg wrote: >> (first of all, please, how to reply to some article in LARTC via mail >> to post it into right thread?) AK> Using 'reply all', or 'reply list' if your mail software offers it. AK> If all else fails, just hit 'reply' and add the mailing list to CC. >> So, I am definitely shaping outgoing traffic (upstream) AK> Yes, outgoing traffic from router to your network, which actually AK> contains the downstream traffic from the internet. Right? >> tc -d class show dev eth0 >> >> class htb 1:2 root rate 100000Kbit ceil 100000Kbit burst 51587b/8 mpu >> 0b overhead 0b cburst 51587b/8 mpu 0b overhead 0b level 7 >> >> class htb 1:2000 parent 1:2 leaf 2000: prio 0 quantum 200000 rate >> 50000Kbit ceil 100000Kbit burst 26593b/8 mpu 0b overhead 0b cburst >> 51587b/8 mpu 0b overhead 0b level 0 >> >> class htb 1:3010 parent 1:2 leaf 3010: prio 1 quantum 1000 rate >> 64000bit ceil 256000bit burst 1631b/8 mpu 0b overhead 0b cburst >> 1727b/8 mpu 0b overhead 0b level 0 >> >> class htb 1:3020 parent 1:2 leaf 3020: prio 2 quantum 1600 rate >> 128000bit ceil 768000bit burst 1663b/8 mpu 0b overhead 0b cburst >> 1983b/8 mpu 0b overhead 0b level 0 >> >> class htb 1:3030 parent 1:2 leaf 3030: prio 3 quantum 6400 rate >> 512000bit ceil 2048Kbit burst 1855b/8 mpu 0b overhead 0b cburst >> 2623b/8 mpu 0b overhead 0b level 0 >> >> class htb 1:5040 parent 1:2 leaf 5040: prio 4 quantum 4825 rate >> 386000bit ceil 386000bit burst 1792b/8 mpu 0b overhead 0b cburst >> 1792b/8 mpu 0b overhead 0b level 0 AK> It's as I suspected, your current HTB tree looks like this: AK> 1: HTB Qdisc AK> | AK> \--- 1:2 HTB root class (100000Kbit:100000kbit) AK> | AK> \--- 1:2000 HTB leaf class (50000Kbit:100000Kbit) AK> \--- 1:3010 HTB leaf class (64000bit:256000bit) AK> \--- 1:3020 HTB leaf class (128000bit:768000bit) AK> \--- 1:3030 HTB leaf class (512000bit:2048Kbit) AK> \--- 1:5040 HTB leaf class (386000bit:386000bit) AK> HTB classes borrow from their parent; in this setup, the parent class AK> offers a whopping 100000Kbit for that purpose. Unless the 1:2000 class AK> has got a very high priority and is maxing out the line all the time, AK> there is no limit to borrowing at all, because the other classes will AK> never reach the 100000Kbit from their parent. AK> So the classes above are actually not limited by their rate, but by AK> their ceil; the only class that will respect its rate in this setup AK> is 1:5040, because it's got the same rate and ceil. AK> Assuming that 1:5040 was your P2P class, if you set the ceil of this AK> class to 2048Kbit, it will (try to) use 2048Kbit at all times, because AK> the parent (thinks it) is able to offer it. AK> You need a class that knows of your total internet bandwidth somewhere. AK> Assuming that it is 2048Kbit, your tree should maybe look more like this: AK> 1: HTB Qdisc AK> | AK> \--- 1:2 HTB root class (100000Kbit:100000kbit) AK> | AK> \--- 1:2000 HTB leaf class (50000Kbit:100000Kbit) AK> | AK> \--- 1:3000 HTB parent class (2048Kbit:2048Kbit) AK> | AK> \--- 1:3010 HTB leaf class (64000bit:256000bit) AK> \--- 1:3020 HTB leaf class (128000bit:768000bit) AK> \--- 1:3030 HTB leaf class (512000bit:2048Kbit) AK> \--- 1:5040 HTB leaf class (386000bit:386000bit) AK> In this setup, the 2048Kbit class is the limiting factor for the leaf AK> classes, except for the 1:2000 class, which should be used for local AK> LAN traffic only. AK> HTH AK> Andreas Klauer _______________________________________________ LARTC mailing list LARTC@xxxxxxxxxxxxxxx http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc