How to Wget: Manage network Bandwidth rate and Quota using Wget

While using Wget in scripts or otherwise, mostly when there is a lot of content to be downloaded, we need to set wget's network usage and bandwidth parameters. They both default to unlimited and when there is a lot of download involved, its always a good practice to set the limits. In this article, we will see how to control the bandwidth rate and total usage(quota).

Limit the download bandwidth rate using Wget's --limit-rate option

Just like any other application, wget will try to use the maximum amount of bandwidth available. If you want to control the download rate of wget, then use the --limit-rate flag. Lets say you want to download some video.

[shredder12]$ wget --limit-rate=60k http://foo.bar/video.ogv

This will limit the download rate to 60 KBps. Use "m" for MBps. Wget even accepts a decimal value, e.g. 2.5. This flag is beneficial only for large files. Thats because the implementation of the rate limitation feature takes sometime to achieve the concerned limit. So, it might not appear to be working for small files.

How to Wget: limit network bandwidth usage/quota using Wget's -Q option

The network quota or the total bandwidth usage can also be limited using wget's --quota or -Q attribute.

[shredder12]$ wget --quota 10m http://foo.bar/file.tgz http://foo.bar/otherfile.tgz

Please note that, if quota overflows while downloading a file then further downloading will be stopped once the current file is successfully downloaded. So, if the size of both the files are 8 and 5 MB then it will download both of them. Just like --limit-rate we can use m for Mega Bytes and similarly others. 0 sets the value to be unlimited.

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <img> <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <h1> <h2> <h3> <h4> <h5> <h6> <p> <br>
  • Image links with 'rel="lightbox"' in the <a> tag will appear in a Lightbox when clicked on.
  • Search Engines will index and follow ONLY links to allowed domains.

More information about formatting options

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.