Throttling bandwidth of Apache server

Got problems with your B2 or B3? Share and get helped!
Post Reply
MarcC
Posts: 6
Joined: 07 Mar 2011, 18:24

Throttling bandwidth of Apache server

Post by MarcC »

Hello to you all,

The Apache server on my B3 manages to saturate the upload bandwidth of my home internet access. So I was looking for a way of throttling the bandwidth used by the Apache server (but not of all the B3's WAN traffic as all my home traffic goes through the B3).

Do you have suggestion regarding this?

For instance, I fell on the "mod_cband" module for Apache2. But the configuration following http://www.howtoforge.com/mod_cband_apa ... throttling fails from the start (gcc not found). I'm under the impression it's maybe not the ideal solution, and surely some of you have ideas about it.

Thanks
Marc
RandomUsername
Posts: 904
Joined: 09 Oct 2009, 18:49

Re: Throttling bandwidth of Apache server

Post by RandomUsername »

What kind of web content are you serving? If you load a website it's usually like this: <load for a few seconds> <read content for a few minutes>. So I'm wondering why your bandwidth would be constantly saturated. Are you hosting something for Google or the BBC that has a constant stream of visitors? :)
MarcC
Posts: 6
Joined: 07 Mar 2011, 18:24

Re: Throttling bandwidth of Apache server

Post by MarcC »

I've digitized my family films. I've sent an group message to my family for them to get the films from the B3 (with an adhoc account). Only from the drop in speed in my connection, I can see whenever one of them is trying to access one of these files.
ryz
Posts: 183
Joined: 12 Feb 2009, 06:03

Re: Throttling bandwidth of Apache server

Post by ryz »

The easiest way to install the most essential program to be able to build your own program is to run as root

Code: Select all

apt-get install build-essential
ryz
Posts: 183
Joined: 12 Feb 2009, 06:03

Re: Throttling bandwidth of Apache server

Post by ryz »

After some quick serch on the web I wonder if installing "mod_cband" is such a great idea. Se this bug report for instance http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=463789.

There seems to be a module called libapache2-mod-bw that is still maintained and available as an installable package that does something similar. I have not used any of the modules.
MarcC
Posts: 6
Joined: 07 Mar 2011, 18:24

Re: Throttling bandwidth of Apache server

Post by MarcC »

Thanks: Already packaged and still maintained seems a clear improvement :)
I'll look into it and post the result for the sake of documentation.

[EDIT]
Yep, it works wonders! I'll document it on the wiki over here
Post Reply