0

Running with ubuntu.

I have clients that has limited transfer rate. I need to test my server to see in how much clinets with limited transfer rate it support?

Is there any utility that allow me to download file from server and limit the download rate?

The traffic is tcp.

Thnak you

Avihai Marchiano
  • 612
  • 3
  • 16
  • 32

2 Answers2

3

Both wget, cURL and aria2 support a download speed limit:

$ wget --limit-rate=10k http://www.far-away-site.com/file.dat
$ curl --limit-rate 10K http://www.far-away-site.com/file.dat
$ aria2c --max-download-limit=10K http://www.far-away-site.com/file.dat

You could also limit the speed on the Linux client to test with other download tools that doesn't support speed-limiting by using tc, the traffic conditioner. From the lartc guide:

# clean existing down- and uplink qdiscs, hide errors
tc qdisc del dev eth0 root    2> /dev/null > /dev/null
tc qdisc del dev eth0 ingress 2> /dev/null > /dev/null
# install root CBQ
tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 100mbit
# shape everything at 10kbps
tc class add dev $DEV parent 1: classid 1:1 cbq rate 10kbit allot 1500 prio 5 bounded isolated
petrus
  • 5,297
  • 26
  • 42
0

for testing throughput, I recommend iperf - for TCP it will establish an appropriate transfer quantity - UDP does however require you to give it a target link bandwidth due to its stateless nature.

Olipro
  • 3,007
  • 19
  • 18