tc command's transport rate does not seem normal

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux
  • tc command with TBF qdisc to ratelimit network bandwidth

Issue

  • tc command's transport rate does not seem normal
  • For example, apply a 30 megabyte (240 megabit) per second ratelimit:
 # tc qdisc add dev bond2 root tbf limit 10Mb burst 10Mb rate 30Mbps
  • Confirm the 240 megabit limit is correctly applied:
 # tc -s qdisc show dev bond2

 qdisc tbf 8005: root refcnt 17 rate 240000Kbit burst 10Mb lat 1us
 Sent 1328 bytes 8 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
  • Using the scp command, the rate slows down to 12 kilobytes (96 kilobit) per second, which is far less than the expected ratelimit.

Resolution

Disable network interface offloading.

  • Check what offloading is applied with:
ethtool -k eth0
  • Disable any offloading with:
ethtool -K eth0 tx off tso off gso off

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments