Linux bandwidth throttling

While doing a large file upload from my Ubuntu laptop, my internet connection was unusable from other machines at my house. I looked at the bandwith monitor on my router and saw that it was solidly uploading at 60KB/second – the upper limit of my home connection. I didn’t want to interrupt the upload already in progress so I installed an app called wondershaper.
[code]
sudo apt-get install wondershaper
[/code]

Now, on the Linux machine doing the upload I was able to limit the network interface upload speed to 20KB/second with the following command.
[code]
sudo wondershaper wlan0 1000 200
[/code]
Check the man pages for documentation, but just testing various combinations of numbers and calling the ‘clear’ command in between was good enough for me.

When it’s finished I can reset the connection speeds with:
[code]
sudo wondershaper wlan0 clear
[/code]