apt-get download rate limiting SOLVED



[This message has also been posted to linux.debian.user.]
I'd like to run 'apt-get -d upgrade'
and limit the download rate to half the 130 KB/sec
capacity of my DSL line, so it doesn't get in the way.
I tried adding a file /etc/apt/apt.conf.d/76download
containing this

Acquire
{
http
{
Dl-Limit "65";
};
};

That code limits the download rate of any one package
to 65 KBps, but then apt-get fetches two at a time,
and they saturate the line.
The winning configuration is:

Acquire
{
Queue-mode "access";
http
{
Dl-Limit "65";
};
};

I tried Queue-mode "host" first, and still got
multiple simultaneous downloads.
That isn't obvious from the apt.conf manpage.

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

With Queue-mode "host", I may have got one "connection,"
whatever that is, but two downloads came through
it at once, at 130KBps, both from the same archive host.
Maybe it's a bug.

I also tried Pipeline-Depth "1"; which had no effect.

Posted to benefit the next person trying to
cumulatively rate-limit apt-get HTTP downloads.



Cameron




Newsgroups: linux.debian.user
From: "Cameron L. Spitzer" <cls@xxxxxxxxxxxxxxxxx>
Subject: apt-get download rate limiting SOLVED
Organization:
Followup-To:
X-Warning: I take time to damage spammers.
Cc: debian-user@xxxxxxxxxxxxxxxx

I'd like to run 'apt-get -d upgrade'
and limit the download rate to half the 130 KB/sec
capacity of my DSL line, so it doesn't get in the way.
I tried adding a file /etc/apt/apt.conf.d/76download
containing this

Acquire
{
http
{
Dl-Limit "65";
};
};

That code limits the download rate of any one package
to 65 KBps, but then apt-get fetches two at a time,
and they saturate the line.
The winning configuration is:

Acquire
{
Queue-mode "access";
http
{
Dl-Limit "65";
};
};

I tried Queue-mode "host" first, and still got
multiple simultaneous downloads.
That isn't obvious from the apt.conf manpage.

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

With Queue-mode "host", I may have got one "connection,"
whatever that is, but two downloads came through
it at once, at 130KBps, both from the same archive host.
Maybe it's a bug.

I also tried Pipeline-Depth "1"; which had no effect.

Posted to benefit the next person trying to
cumulatively rate-limit apt-get HTTP downloads.



Cameron



--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Adding download column to existing visitors table (as requested)
    ... # add this visitor entry into database (hits && downloads are defaulted) ... cur.execute('''INSERT INTO visitors (counterID, refs, host, city, ... visit time && torrent download ...
    (comp.lang.python)
  • Re: OT Reply: Can you really 100% clean a compromised machine 100% of the time w
    ... > I think that it was you with the suggestion that a Google search on pcbutts1 ... He claim has full permission to host the vendors files, ... He has moved to password authentication for his downloads since we ...
    (microsoft.public.windowsxp.security_admin)
  • Re: "apt-get dist-upgrade" Question:
    ... > Will it check these downloads for errors with an md5 ... Slow, and painfully slow, yes. ... apt-get is smart enough that it will see what packages and even the ...
    (Debian-User)
  • Re: Dr. OHO
    ... It's a generic name for a host of little irritants. ... piggy-backs on downloads you ask for, ...
    (uk.rec.sheds)
  • Re: Whats going on in TBBS land?
    ... Striker and have been told that the hardware has died but this ... He has a new host, but is in the process of getting all his domains ... Or at least I need to get a complete backup of the downloads ... and the bbs listings... ...
    (comp.bbs.tbbs)