PDA

View Full Version : V3 Bandwidth Control


jbland
10-23-2004, 11:21 PM
This is more of a feature request for V3, but I would like to have something similar to HTB for bandwidth control. For those that don't know, HTB has bursting which allows one to set min and max bandwidth for upload and download. I currently use CBQ at a couple of my sites, but use HTB at the NOC. Here are some observations between the two methods. Because of the strengths of HTB, mikrotik has even implemented into their OS.

HTB Pros versus CBQ
1. Bursting - Very similar to what DSL and Cable systems do. This is the space we all compete against so we should have the same capabilities.
2. Handles bandwidth more efficiently - I have a lot more users on a T1 using HTB than CBQ. The users are not that different it's just HTB seems to share the bandwidth a lot better and only takes a small hit on latency. Where as CBQ seems to drop the bandwidth way down or I get huge latency spikes showing that it doesn't level things off too well.
3. HTB has a higher accuracy on bandwidth calculations. When I throttle 1.5M using HTB I get 1.5. CBQ tends to be all over the place. When I researched this I found that its because of the way CBQ calculates available bandwidth.
4. HTB is now included in the linux distro as of 2.4.20
5. HTB is well documented and active

HTB Con's
1. Doesn't scale as well as CBQ beyond 1000 classes. This is not really a problem for me because that would mean I would have more than 1000 users and I'm sure I could use 2nd bandwidth manager by then :) but for some this may be a problem

I'm sure you'll probably make the best choice for bandwidth manager, but if I were you I would consider HTB as an alternative if not a replacement for CBQ. The scripting could be very similar as it seems you use a parser to write the "real" rules behind the scene's and what the user sees is just a front end scripting language.

I wanted to add that I do love the added features in Star-OS over time. Adding a range in CBQ was great, 1 line and now I have bandwidth control for an entire subnet. I use to write or hack my way through solutions and I wanted to say thanks for all the time you have saved me in not having to do everything myself and allowing me to focus on my business versus software development.

lonnie
10-24-2004, 01:12 AM
The Server version will have a more enhanced CBQ with borrowing and priorities. We like our CBQ and it does a good job. It just needs some more features. The Router version will stay simpler with CBQ.

patos
10-25-2004, 02:35 PM
We also use HTB in our NOC .

Here is an example of what YOU get :

User CLEVER use 61 Kbit/s that 96/0 Rate/Burst % (Hour MB(17) Day MB(628) )
User BKHAZAAL use 362 Kbit/s that 36/0 Rate/Burst % (Hour MB(264) Day MB(5114) )
User ABOUALI use 63 Kbit/s that 24/0 Rate/Burst % (Hour MB(55) Day MB(852) )
User TARAF use 1329 Kbit/s that 88/0 Rate/Burst % (Hour MB(497) Day MB(7629) )
User DATASHARE use 713 Kbit/s that 139/41 Rate/Burst % (Hour MB(126) Day MB(2544) )
User PCNET use 590 Kbit/s that 115/30 Rate/Burst % (Hour MB(218) Day MB(2791) )
User HAMICOM use 271 Kbit/s that 70/0 Rate/Burst % (Hour MB(119) Day MB(1924) )
User NEWNET use 2946 Kbit/s that 98/0 Rate/Burst % (Hour MB(1238) Day MB(17954) )
User WORLDNET use 1228 Kbit/s that 122/45 Rate/Burst % (Hour MB(508) Day MB(7212) )
User SAKER use 12 Kbit/s that 20/0 Rate/Burst % (Hour MB(0) Day MB(229) )
User SHAWKAT use 726 Kbit/s that 72/0 Rate/Burst % (Hour MB(306) Day MB(3339) )
User cbsss use 2854 Kbit/s that 142/42 Rate/Burst % (Hour MB(1227) Day MB(20877) )
User MACTEL use 1537 Kbit/s that 102/7 Rate/Burst % (Hour MB(661) Day MB(10213) )


HTB can calculate total amount of downlink and uplink and give bursts to people needed so you can always have fulllllll capacity without any problems .

jbland
10-26-2004, 05:28 PM
I'm sure you can make CBQ a good solution, but why not go with something that's out there and working well. Not to mention it's included in the linux kernel. It's the same reason not to develop a solution for routing or write your own kernel, if what's out there works well use it.

The only reason I mention it is because the current CBQ solution can't hold a candle to my HTB. I have two 2 meg connections and one is HTB and the other CBQ. The HTB has about 100 customers on it and any customer can go to pcpitstop and run a bandwidth test and get around 1500K download speed and close to 128K up, regardless of time etc.. On CBQ I have 18 customers and can't seem to get consistent results. Sometimes a test will display 1350K and the next one will be 300K and so on. The same thing happens with actual download. With HTB the download stays around 150-145K, with CBQ it jumps between 120-140K.

You should at least try HTB for yourself and you'll see what others are seeing. As I said earlier it's in the Kernel and one less thing you have to spend development time on. I'm sure you can also find volunteers to write a parser for you from CBQ to HTB, just have a variable queueing=htb otherwise it defaults to CBQ for everyone else.

lonnie
10-26-2004, 08:58 PM
Does htb allow you to control the user send AND receive even if you are nat'ed or using a proxy?

jbland
10-29-2004, 11:40 PM
Does htb allow you to control the user send AND receive even if you are nat'ed or using a proxy?

Yes, The only thing some might find wierd about this is that you put upload on the Public/outside interface and download on the Private/internal interface. But ultimately it depends on how you do your IP Chains, If Nat and Proxy happen before bandwidth rules then you need to run the rule on the interface that still sees the internal IP.

On my I run shorewall for the firewall and Nat is done before and TC related rule which is why I run it using 2 interfaces as above.

-James