Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My Linux connection is REALLY free.

I live in Brazil, so where I live I can only have 1 Mbit/s. Yes I know it's sad, but it's not the point.

Everytime I'm updating my Ubuntu 9.04 or downloading something, it does eat all my bandwidth. Like, while update-manager is downloading the packages, I can see by netspeed applet in my panel that the incoming traffic goes to 110 kB/s. And then, my Emesene suddenly goes disconnected, and I can't navigate.

As you can imagine, I can't use my Internet connection again until the packages are all downloaded or I cancel the update in the middle.

As I said, same thing happens when I'm dowloading something, but less intrusive and immediate.

The question is: is there any way to limit that APT/downloads traffic to some way I can still use my other Internet services, or to reserve some bandwidth for common navigation tasks (like we have on Windows, but I forgot this thing's name, it's like "something packages".

share|improve this question
up vote 16 down vote accepted

You can configure apt to restrict its download speed by setting a configuration file in /etc/apt/apt.conf.d/, as detailed in this post

Specifically, create a file:


that contains the text:

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

where "65" is the speed in kb/s

share|improve this answer
Okay, that definitely sounds better than mine... Deleting and +1 for you. – balpha Aug 18 '09 at 11:24

For other applications with no auto bandwidth control option, you can use trickle

Example for APT with upload rate of 20 KB/s and download rate of 50 KB/s (you need sudo trickle):

sudo trickle -u 20 -d 50 aptitude dist-upgrade

Example for wget with download rate of 30 KB/s:

trickle -d 30 wget http://...

From trickle's man page:

trickle is a userspace bandwidth manager. Currently, trickle supports the shaping of any SOCK_STREAM (see socket(2)) connection established via the socket(2) interface. Furthermore, trickle will not work with statically linked executables, nor with setuid(2) executables. trickle is highly configurable; download and upload rates can be set separately, or in an aggregate fashion.

share|improve this answer
I don't know what to do... Your post answer my question, but previous post do solve my problem. I think I'll vote for the other, but vote up your answer =] – igorsantos07 Aug 19 '09 at 3:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .