Limiting apache's upload speed?

Jeff Royle lists at qwirky.net
Sun Apr 13 12:24:28 UTC 2008


Patsy wrote:
> Hello list,
> 
> I am running FreeBSD 7.0-RELEASE (GENERIC), I am running Apache 2.2.6_2 
> and hosting a small website with a few relatively small (500kB-900kB) 
> photographs. I am doing so from a home ADSL connection in the UK and so 
> I am estimating my upload capacity at 500kb/s.
> 
> When I have apache enabled and serving the web page it seems to disrupt 
> my other network programs - on my main computer (running Debian etch) 
> Wengophone stutters and my browser slows down noticeably. When apache is 
> disabled these problems disappear.
> 
> I do not wish to take my website down and so I was hoping somebody would 
> be able to tell me if it is possible to throttle apache's upload speed. 
> It seems that this would provide a good solution - people will need to 
> wait a little longer to see my page, but a change of waiting 3 seconds 
> to waiting 6 seconds isn't terrible.
> 
> My router does not appear to have the option to throttle individual 
> hosts/ports. Any advice on the matter would be appreciated.
> 

I would suggest you look into PF + ALTQ.

ALTQ is a rule based bandwidth control for PF which would allow you to 
adjust how much bandwidth you allow on the port 80.

You will need to enable ALTQ in your kernel as it does not come enabled 
by default.

See pf.conf(5) and altq(4)for more details.

Cheers,

Jeff


More information about the freebsd-questions mailing list