FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 02-11-2009, 02:50 PM
"H.S."
 
Default controlling the download transfer rate while updating a system

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:L-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.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-11-2009, 08:22 PM
NoOp
 
Default controlling the download transfer rate while updating a system

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.
>
> 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:L-Limit=100 safe-update
>
> Regards.
>

Thanks! I've been 'Wishing' that for some time now... to the point of
filing a Wishlist bug last February:

https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/193558
[ [Wishlist] Include limit-rate bandwidth option]

I'll give your method a go. That said, I'd still like to see a simple
configuration option in update-manager (similar to that of gwget) so
that users don't have to manually edit apt config files.

Note: not snipping on pupose as I'd like to leave both for the archives.




--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-12-2009, 08:23 PM
NoOp
 
Default controlling the download transfer rate while updating a system

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.



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-12-2009, 08:32 PM
"H.S."
 
Default controlling the download transfer rate while updating a system

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.

--

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.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-12-2009, 09:58 PM
NoOp
 
Default controlling the download transfer rate while updating a system

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 :-)




--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-13-2009, 07:54 PM
NoOp
 
Default controlling the download transfer rate while updating a system

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.
>

Both work when used in /etc/apt/apt.conf

"Fetched 677kB in 33s (20.2kB/s)"

I can't recall where I read about using "Queue-Mode "access";" (beyond
the ubuntu forum post), I'll try to dig it up. It was something to do
with limiting the connections so that Dl-Limit didn't spawn other
connections and saturate the link.




--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-13-2009, 09:18 PM
"H.S."
 
Default controlling the download transfer rate while updating a system

NoOp wrote:
> 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.
>>
>
> Both work when used in /etc/apt/apt.conf
>
> "Fetched 677kB in 33s (20.2kB/s)"
>
> I can't recall where I read about using "Queue-Mode "access";" (beyond
> the ubuntu forum post), I'll try to dig it up. It was something to do
> with limiting the connections so that Dl-Limit didn't spawn other
> connections and saturate the link.
>
>
>
>


Thanks a ton for your feedback. Much appreciated.
->HS

--

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.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 01:18 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org