Page 1 of 1

Throttling bandwidth of Apache server

Posted: 04 Apr 2011, 15:47
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

Re: Throttling bandwidth of Apache server

Posted: 04 Apr 2011, 15:51
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? :)

Re: Throttling bandwidth of Apache server

Posted: 04 Apr 2011, 16:11
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.

Re: Throttling bandwidth of Apache server

Posted: 04 Apr 2011, 17:47
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

Re: Throttling bandwidth of Apache server

Posted: 04 Apr 2011, 17:57
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.

Re: Throttling bandwidth of Apache server

Posted: 05 Apr 2011, 02:05
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