I found myself in the position earlier of wanting to download all the latest Debian CD images so I can do an install on a system with no network connectivity, then quickly discovered that this was going to take a while with my relatively slow connection (apparently 8Mb/s is good for a village in the middle of Hampshire), and having ‘wget’ use all the available bandwidth was a bit of a nuisance.
Since I’m not in any hurry I decided to see if I could limit the bandwidth that ‘wget’ uses, so it didn’t get in the way of the rest of my digital life.
Note – It you already have a set of images and just want to update them then ‘jigdo‘ is more efficient and kinder to your bandwidth as well.
# man wget : : : --limit-rate=amount Limit the download speed to amount bytes per second. Amount may be expressed in bytes, kilobytes with the k suffix, or megabytes with the m suffix. For example, --limit-rate=20k will limit the retrieval rate to 20KB/s. This is useful when, for whatever reason, you don't want 'wget' to consume the entire available bandwidth. This option allows the use of decimal numbers, usually in conjunction with power suffixes; for example, --limit-rate=2.5k is a legal value. Note that 'wget' implements the limiting by sleeping the appropriate amount of time after a network read that took less time than specified by the rate. Eventually this strategy causes the TCP transfer to slow down to approximately the specified rate. However, it may take some time for this balance to be achieved, so don't be surprised if limiting the rate doesn't work well with very small files. : :
Yay – That is exactly what I wanted. So to download all the Debian CD images without hogging all my bandwidth I used the following command.
# wget ftp://cdimage.debian.org/debian-cd/8.1.0/i386/iso-cd/ -r -c -b -nv\ > --limit-rate=128k
Remember the man pages are your friends.