5
1
We have a network product that runs on Linux and needs to be tested in reduced bandwidth networks.
We have been able to use 'tc' (traffic control) in Linux and dummynet in FreeBSD to inject delay (latency) with predictable behavior.
But when we try to throttle the bandwidth with either of these, it does not seem to have much effect.
Here is an example of trying to use 'tc' to set the bandwidth to 512Kbps:
tc qdisc change dev eth0 root tbf rate 512kbit burst 1540
But when we run 'scp' over that connection we see speeds that are way higher than we expect.
Here are results of setting various bandwidths in both dummynet and tc. You can see that it has SOME effect but not very much.
BW _______DUMMYNET__________ __________ TC __________ 10Mbps 1m,3.489s 4.0MB/s 1m,2.732s 4.1MB/s 8Mbps 1m,3.461s 4.0MB/ 1m,2.728s 4.1MB/s 6Mbps 1m,3.905s 4.0MB/s 1m,2.710s 4.0MB/s 1Mbps 1m, 3.261s 4.0MB/s 1m,2.680s 4.0MB/s 512Kbps 1m,26.175s 3.0MB/s 1m 25.409s 3.0MB/s 256Kbps 2m,39.079s 1.6MB/s 2m 53.004s 1.5MB/s 128Kbps 5m, 3.501s 852.7KB/s 5m, 50.491s 739.7KB/s 64Kbps 9m,48.907s 463.3KB/s 9m,53.105s 436.5KB/s
I don't have the syntax we've used for DUMMYNET handy but I'll post it later.
This may solve our problem for 'tc' but if anyone knows how to setup dummynet that would be good to know. A potential customer needs to see this run in a dummynet based network emulation. Here is the post with the 'tc' info: http://superuser.com/questions/147156/simulating-a-low-bandwidth-high-latency-network-connection-on-linux
– lcbrevard – 2010-12-03T17:24:57.543working on getting it working in vm (dummynet bridge) with a proof video...may take a bit to get it working record and post video, but it's coming – RobotHumans – 2010-12-03T17:50:38.633
note in dummynet you don't just ratelimit you also have a delay parameter – RobotHumans – 2010-12-07T13:28:10.483
Oops... I commented below before I saw this. The customer environment has reduced bandwidth AND very long delay (>500ms). We showed that the bandwidth reduction was simply not working with the above tests. If we only put in delay we get the expected results. We concluded that our setup for bandwidth reduction was wrong on both tc and dummynet! – lcbrevard – 2010-12-07T17:10:46.057