I used a cluster with infiniband 40Gb switch.

For the sake of testing my application program, I need to measure the performance at a network environment with lower communication speed such as 1Gbps or 10 Gbps ethernet.

Is there any way to limit the network bandwidth usage of a certain network interface?

  • Yes, there are ways of limiting bandwidth. What is the switch? – Ted Quanstrom Jan 8 '17 at 8:28
  • @Tedwin The model of switch is Mellanox IS5030. (Is there any way to achieve it on OS?) – syko Jan 8 '17 at 10:33
  • Unfortunately, host/server/VM configurations are off-topic here. – Ron Maupin Jan 8 '17 at 18:16
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer. – Ron Maupin Aug 15 '17 at 17:46

If you are testing the application you can limit speed in virtual enviroment: - in VirtualBox network bandwidth limit or - in VMWare Workstation - Configure Bandwidth and Packet Loss Settings for a Virtual Machine

With VMWare you can even simulate unstable connection with packet loss!

  • Unfortunately, host/server/VM configurations are off-topic here. – Ron Maupin Jan 8 '17 at 18:15

Yes, there is. For FreeBSD, dummynet might be the answer. However, most people use Linux these days instead of FreeBSD. You can in Linux use tc -- see the rate control part of the link. tc with netem can also add constant or variable latency to packets.

Do consider, however, that real networks have high latency in addition to low bandwidth. So, you might want to emulate latency in addition to limited bandwidth as well. Otherwise you aren't testing your application well enough.

If you use FreeBSD or Linux, you don't need to change the switch configuration to obtain the limited bandwidth. It can be done on the host where the application program runs. Unfortunately, if you run the application on Windows, I don't have a solution for you. In that case, you need to see if the switch has rate limiting options. Not all switches do.

Not the answer you're looking for? Browse other questions tagged or ask your own question.