Does anyone know to limit upload speed on linux machine?
I am trying to do this for some evaluation work, were I am interested to test certain tasks at various network speeds (500kB/s, 1MB/s, 2MB/s... etc).
To achieve different network speeds, I first tried to use dd-wrt firmware on a local router. However, later I found out that I am able to limit network speed only for download and not for upload.
Does anyone know if its possible to do something on linux machine to limit upload speed? For my tests, I am just using ssh (or scp) to uploading and uploading.
A quick and easy way would be to set the bitrate with iwconfig (there must be iproute2 commands as well)
For cards supporting multiple bit rates, set the bit-rate in b/s. The bit-rate is the speed at which bits are trans‐
mitted over the medium, the user speed of the link is lower due to medium sharing and various overhead.
You may append the suffix k, M or G to the value (decimal multiplier : 10^3, 10^6 and 10^9 b/s), or add enough '0'.
Values below 1000 are card specific, usually an index in the bit-rate list. Use auto to select automatic bit-rate mode
(fallback to lower rate on noisy channels), which is the default for most cards, and fixed to revert back to fixed
setting. If you specify a bit-rate value and append auto, the driver will use all bit-rates lower and equal than this
iwconfig eth0 rate 11M
iwconfig eth0 rate auto
iwconfig eth0 rate 5.5M auto
Common bit rates are g 6, 9, 12, 18, 24, 36, 48, 54.. I am not sure if you can specify a non-common bit rate.