controlling the download transfer rate while updating a system
NoOp
glgxg at sbcglobal.net
Thu Feb 12 22:58:04 UTC 2009
On 02/12/2009 01:32 PM, H.S. wrote:
> NoOp wrote:
>> 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.
>>
>>
>>
>
> er ... could you try with and then without the queue-mode options? You
> can use "-d" with aptitude (or apt-get) to only download and not install
> the updates. Then do "aptitude clean" to get rid of the downloads,
> toggle queue-mode option, and download the updates again and if there is
> any difference in the download bandwidth cap.
>
> Thanks.
>
I tried /with/ before I saw your msg. I set for 65 and the dl rate
seemed to have capped at about 74kb/s (on a 1.5Mb link which normally
shows a 159kb/s download when updates such up the link).
I've got another that I'll try with both and the '-d'. Thanks for the
suggestion as I'd really, really, like to get this perfected :-)
More information about the ubuntu-users
mailing list