controlling the download transfer rate while updating a system

H.S. hs.samix at gmail.com
Wed Feb 11 15:50:21 UTC 2009


Hello,

There have been times where I have wished that I could control the
download rate while the system was being updated and updates were being
downloaded. Well, I discovered this on Debian user mailing list and
tried it with success so I wanted to share the experience.

To control the default download rate while the updates are being
downloaded, make the change in /etc/apt/apt.conf (using sudo). I
inserted the following lines in a machine to cap the download rate
//-------------------------------------------------------------
// Options for the downloading routines
Acquire
{
  // HTTP method configuration
  http
  {
    Dl-Limit "20";        // maximum download rate in KB/s
  };

};
//-------------------------------------------------------------

Note the Dl-Limit number has units of Kilo Bytes per second.

Now, what if I wanted to utilize larger bandwidth for the transfers? I
could either change the number in the file and then do the update, or I
could specify the new limit on a command line itself. The following
command, as an example, will update the system by capping the download
speed to 100 KB/s (one could use apt-get instead of aptitude if desired).

$> aptitude -o Acquire::http::DL-Limit=100 safe-update

Regards.

-- 

Please reply to this list only. I read this list on its corresponding
newsgroup on gmane.org. Replies sent to my email address are just
filtered to a folder in my mailbox and get periodically deleted without
ever having been read.





More information about the ubuntu-users mailing list