Limiting download speeds in Apt in Ubuntu

While trying to download some software on Ubuntu at work I thought I needed to limit the speed apt downloads files so that I don’t eat my peers bandwidth. So I started searching around using Google (of course) and came across various thread which suggested using trickle and wondersharper for usermode bandwidth shaping. But then I hit upon this brilliant post which showed how you can setup apt-get to download speed as a configuration. Here is what you need to do.

Create a file named 76download in /etc/apt/apt.conf.d/ and add this to it :

Acquire
{
  Queue-mode "access";
  http
  {
    Dl-Limit "65";
  };
};
The Dl-Limit value specifies your download speed in kbps.
Try it out :-) 
Original source with some more info : http://linux.derkeiler.com/Mailing-Lists/Debian/2008-02/msg01872.html
Posted in Ubuntu

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 
Archives
Stack Excange profile