Traffic shaping

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
zodiachus
DD-WRT Novice


Joined: 13 Oct 2006
Posts: 5

PostPosted: Fri Oct 13, 2006 10:26    Post subject: Traffic shaping Reply with quote
Is it possible to do traffic shaping with DD-WRT, i.e. something like what cFosSpeed does, but on router level?
The actual issue here is that almost any upload traffic, above say 2Kb/s, brings down download speed from 2Mbit/s to about 5Kb/s. Traffic shaping/packet scheduling (i.e. cFosSpeed) seems to do the trick, but since there is more than one computer using the router, I need some computer independent solution.

Also, is there some explanation to this behavior? Someone seemed to think that ACK packages get clogged up in the pipe (so to speak) for some reason.

Many thanks.
Sponsor
indianboy
DD-WRT User


Joined: 05 Oct 2006
Posts: 139

PostPosted: Sun Oct 15, 2006 15:41    Post subject: Reply with quote
Cfos Doesnt do any good for me . It just just the cached web pages to minimize the request time and tunes the registry with the MTU etc.....

If these type of facility is available then i would be glad to know more about it.
JRH
DD-WRT User


Joined: 20 Jun 2006
Posts: 65
Location: United Kingdom

PostPosted: Mon Oct 16, 2006 15:05    Post subject: Reply with quote
Check out DD-WRT's built in QoS options, which is traffic shaping in other words. It does work very well once you get the setup right, but it'll take a bit of tinkering. Smile
zodiachus
DD-WRT Novice


Joined: 13 Oct 2006
Posts: 5

PostPosted: Wed Oct 18, 2006 10:04    Post subject: Reply with quote
Quality of Service is interesting, except that (as I understand it) it seems that you actually reserve a bit of bandwidth for certain application. That isn't a very good solution seeing as I don't really want to cap say an FTP transfer at 85% of max speed unless I have something that wishes to use the other 15%. I'm looking for two things:

1) A solution similar to process priority in an operating system: FTP transfers would be slightly below normal priortity, VOIP slightly above normal.
2) Some way of balancing incoming and outgoing traffic. Somehow outgoing and incoming traffic seems to compete with each other, with outgoing always winning. If there is an upload, any downloads will be practically halted until there is not outbound traffic anymore. I have no idea why this is.

Actually, cFos worked quite well for me. At least I can have inbound and outbound traffic at the same time now (although it is still capped at say 25kb/s in each direction, about 1/10th of capacity). But that "solution" only works for one computer, not many.
paulo_andre
DD-WRT User


Joined: 15 Oct 2006
Posts: 82

PostPosted: Wed Oct 18, 2006 11:43    Post subject: Reply with quote
actually, cfosspeed developers have promised a distributed version a long time ago, so it must be release soon. That version will do what you want: traffic shaping for multiple computers connected to a router.
zodiachus
DD-WRT Novice


Joined: 13 Oct 2006
Posts: 5

PostPosted: Fri Oct 20, 2006 14:09    Post subject: Reply with quote
Sounds interesting! I wonder how they are going to accomplish that without actually modifying FW on the router itself.
paulo_andre
DD-WRT User


Joined: 15 Oct 2006
Posts: 82

PostPosted: Fri Oct 20, 2006 23:06    Post subject: Reply with quote
it's not that hard, all they have to do is implement a communication protocol between all lan computers, all cfosspeed will share info like what bandwidth is available, what is required and then act on that information. The bottleneck is always the wan connection, not the lan connection, so they can "talk" all they want.
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Sat Oct 21, 2006 8:35    Post subject: Reply with quote
zodiachus wrote:
Quality of Service is interesting, except that (as I understand it) it seems that you actually reserve a bit of bandwidth for certain application. That isn't a very good solution seeing as I don't really want to cap say an FTP transfer at 85% of max speed unless I have something that wishes to use the other 15%.

Not at all. The reason you set your bandwidth slightly below the real value is to give it a bit of leeway for overhead.
zodiachus wrote:
1) A solution similar to process priority in an operating system: FTP transfers would be slightly below normal priortity, VOIP slightly above normal.

This is exactly what QoS does. You can set priorities for protocols, ip's, mac's, and physical ports. You'll want to set rules for all of your file transfer protocols to be bulk traffic and your voip should be set as premium traffic. Use extreme caution setting anything to exempt because QoS will then allow it to eat as much bandwidth as it wants.
zodiachus wrote:
2) Some way of balancing incoming and outgoing traffic. Somehow outgoing and incoming traffic seems to compete with each other, with outgoing always winning. If there is an upload, any downloads will be practically halted until there is not outbound traffic anymore. I have no idea why this is.

Your computer has to acknowledge that it received a chunk of data that was sent to you. To do that it has to send a small message to the other computer which uses a tiny portion of your upstream. If your upstream is flooded then these acknowledgments get delayed which causes the other end to send to you slower because it realizes you can't handle it. On a symmetric connection (upstream/downstream are the same) this is never really a problem but with asymmetric connections where upstream is usually a small fraction of downstream then it becomes hard to do both at the same time because you end up using most of your upstream just to send acknowledgments for your downloads. You can use QoS to maximize traffic in both directions if different protocols are using the bandwidth in different directions but if a single protocol is eating both then it's up to the application to shape its own traffic to do this. For example if you were downloading with http but uploading with ftp then you could give http a higher priority than ftp but if you were uploading and downloading with bit torrent then QoS couldn't do anything.
zodiachus
DD-WRT Novice


Joined: 13 Oct 2006
Posts: 5

PostPosted: Mon Oct 23, 2006 9:23    Post subject: Reply with quote
paulo_andre wrote:
it's not that hard, all they have to do is implement a communication protocol between all lan computers, all cfosspeed will share info like what bandwidth is available, what is required and then act on that information. The bottleneck is always the wan connection, not the lan connection, so they can "talk" all they want.

This is true. However, a solution like this would increase the traffic between computers, which is fine as long as you don't have many of them. But the number of connections would increase with the number of computers according to the Wolfram sequence (i think). Two computers means one connection, three computers means three connections, four computers means six connections and so on. For a network with 20 computers we would have 4794 connections constantly open in order to maintain balance. Probably not good. (Unless you assign one computer as a contact point of some sort.)

phuzi0n wrote:
Your computer has to acknowledge that it received a chunk of data that was sent to you. To do that it has to send a small message to the other computer which uses a tiny portion of your upstream. If your upstream is flooded then these acknowledgments get delayed which causes the other end to send to you slower because it realizes you can't handle it. On a symmetric connection (upstream/downstream are the same) this is never really a problem but with asymmetric connections where upstream is usually a small fraction of downstream then it becomes hard to do both at the same time because you end up using most of your upstream just to send acknowledgments for your downloads. You can use QoS to maximize traffic in both directions if different protocols are using the bandwidth in different directions but if a single protocol is eating both then it's up to the application to shape its own traffic to do this. For example if you were downloading with http but uploading with ftp then you could give http a higher priority than ftp but if you were uploading and downloading with bit torrent then QoS couldn't do anything.

I see, thanks for the answer. So basically there is no way to universally prioritize the acknowledgment packets?
paulo_andre
DD-WRT User


Joined: 15 Oct 2006
Posts: 82

PostPosted: Mon Oct 23, 2006 13:33    Post subject: Reply with quote
zodiachus wrote:
This is true. However, a solution like this would increase the traffic between computers, which is fine as long as you don't have many of them. But the number of connections would increase with the number of computers according to the Wolfram sequence (i think). Two computers means one connection, three computers means three connections, four computers means six connections and so on. For a network with 20 computers we would have 4794 connections constantly open in order to maintain balance. Probably not good. (Unless you assign one computer as a contact point of some sort.)


OR, you could use broadcast/multicast packets and keep only one "connection" per computer.
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Tue Oct 24, 2006 0:20    Post subject: Reply with quote
zodiachus wrote:
I see, thanks for the answer. So basically there is no way to universally prioritize the acknowledgment packets?

None supported by DD-WRT as far as I can tell. It's something that could probably be added very easily if the QoS app uses some sort of config file to identify different types of traffic but I haven't dug into the source to see what app is used for QoS or how easily it can be configured.
zodiachus
DD-WRT Novice


Joined: 13 Oct 2006
Posts: 5

PostPosted: Tue Oct 24, 2006 10:58    Post subject: Reply with quote
paulo_andre wrote:
OR, you could use broadcast/multicast packets and keep only one "connection" per computer.

I see. Still, that would mean that every machine sends one calibration chunk to every other machine every xth second, wouldn't it?
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
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
You can attach files in this forum
You can download files in this forum