controlling the download transfer rate while updating a system

NoOp glgxg at sbcglobal.net
Thu Feb 12 21:23:45 UTC 2009


On 02/11/2009 07:50 AM, H.S. wrote:
> 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.

I think that you will need to add the queue-mode option:

http://mirror.atrpms.net/ccrma/man/man5/apt.conf.5.html
<quote>
THE ACQUIRE GROUP

       The Acquire group of options controls the download of packages
and the URI handlers.

       Queue-Mode
       Queuing  mode;  Queue-Mode  can  be  one of host or access which
       determines how   APT  parallelizes  outgoing  connections.  host
       means that one connection per target host will be opened, access
       means that one connection per URI type will be opened.
</quote>

So perhaps:

Acquire
{
Queue-mode "access"; // host|access
http
{
Dl-Limit "20"; // maximum download rate in KB/s
};
};

per suggestion:
http://ubuntuforums.org/showthread.php?t=20342

I've also created a /etc/apt/apt.conf.d/76download file with that in
it.. now to test I'll fire up a machine that I haven't had on for a week
or two and see what happens.






More information about the ubuntu-users mailing list