View previous topic :: View next topic |
Author |
Message |
Raniz l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/734529121659526f988451.jpg)
Joined: 13 Sep 2003 Posts: 967 Location: Varberg, Sweden
|
Posted: Sat Oct 23, 2004 10:18 am Post subject: Dynamic bandwidth limiting |
|
|
I have successfully limited Valknut's upload to a specified rate, but I'm not satisfied with that. A static bandwith limit is just that - static.
I wan't something that will limit my upload/download dynamicly. Here's an explanation:
Let's say I've got 10mbit to share between both uploading and downloading (what's the word for that kind of connection?).
When I'm both downloading and uploading I want my upload and download to use 50% each.
But when I'm not downloading I want my upload to be able to use my full 10Mbit, and vice versa.
But say that my download is only using 25%, then I wan't my upload to use 50% + the remaining 25% = 75%, then if my download increases, I wan't my upload to give way for my download until it stops increasing or hits 50%. Or if my download decreases I want my upload to increase.
When my upload is low I wan't my download to use more of my connection and so on.
A simple way of saing it would be to split my connection in half and prioritize download on the first half and upload on the second.
Does anyone understand what I mean and if so, how do I do it? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
haven Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/1874784213402e00b6d6df2.gif)
Joined: 19 Nov 2003 Posts: 141 Location: Belfast, Uk
|
Posted: Thu Oct 28, 2004 12:58 pm Post subject: |
|
|
Normally if you are talking a 10mbit connection you are talking a 1:1 ratio i.e. it is both 10mbit up and 10mbit down. You may have an async ratio but you'd have to speak to your provider about that.
For Rate limiting and traffic control (which is essentially what you are asking about), start by reading the Advanced Routing and Traffic Control How-to:
http://lartc.org/howto/
This covers a lot of advanced topics so you arent going to learn it all in a day ! (or week ...).
As to the limiting, Class Based Queueing (CBQ) is one option and possibly the most complex - it allows you to prioritise certain ip stream and set default throughputs, you can also allow one queue to borrow bandwidth from another when the former is not fully loaded. Be aware that most tools only allow you to control your outgoing bandwidth, its not easy to control the speed of traffic incoming (although you can control it to a small extent using INGRESS filters).
If you want to keep it more simple then avoid CBQ and look at some of the other queuing disciplines on the how-to.
I'll not say much more as the How-to is infinately more detailed than I'd ever want to be
p.s. also emerge net-misc/cbqinit if you want a nicely pre-formatted script to start from (or roll your own, either way works). |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Raniz l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/734529121659526f988451.jpg)
Joined: 13 Sep 2003 Posts: 967 Location: Varberg, Sweden
|
Posted: Thu Oct 28, 2004 8:01 pm Post subject: |
|
|
I haven't really got 10mbit, but 8. And it's not 8up/8down, its 8up/down
I'll have a look at the howto. Thanks! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
FonderiaDigitale Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/160661570245a62657b3321.jpg)
Joined: 06 Nov 2003 Posts: 1710 Location: Rome, Italy
|
Posted: Thu Oct 28, 2004 9:44 pm Post subject: |
|
|
there exists a program called Bandwidth Arbitrator, it's bridge-based, for 2.6.5 kernels, which does this. _________________ Come disse un amico, i sistemisti sono un po' come gli artigiani per l'informatica
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|