Blog /Limiting Bandwidth in Gentoo

April 07, 2011 10:26 +0000  |  Gentoo Linux 0

My office isn't so much a web shop as a investment banking training company that doesn't really use the internet locally. As a result, we have corporate DSL of questionable quality from KPN and whenever I do a software update (like the big one today that pushed KDE to 4.6.2) the few people in the office using the internet get upset. So I poked around looking for options for limiting bandwidth in Gentoo's Portage system.

Most of what I found were dead links to the old Gentoo Wiki, and the one link I found had stale/inaccurate information so I thought that I'd post something here in the hopes that one day it will be useful to someone.

To limit Portage's bandwidth usage to 50K/s just add these lines to make.conf:

FETCHCOMMAND="/usr/bin/wget -t 5 --limit-rate=50k \${URI} --output-document=\${DISTDIR}/\${FILE}"
RESUMECOMMAND="/usr/bin/wget -c -t 5 --limit-rate=50k \${URI} --output-document=\${DISTDIR}/\${FILE}"
PORTAGE_RSYNC_EXTRA_OPTS="--bwlimit=50"

Comments

Post a Comment

Markdown will work here, if you're into that sort of thing.