Limiting apache's upload speed?
smithi at nimnet.asn.au
Sun Apr 13 14:27:47 UTC 2008
On Sun, 13 Apr 2008 11:41:02 +0100 Patsy <freebsd at ethernull.org> 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.
Assuming that's 500kbit/s or maybe around 60KBytes/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.
Like Manolis I suspect your outbound bandwidth is often being saturated
serving images. Unless you leave yourself enough outbound bandwidth for
snappy delivery of requests and acks for inbound sessions, performance
suffers tragically. Bandwidth limiting apache to maybe 400kbit/s should
leave you plenty of headroom (unless you're uploading torrents too :)
> 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.
The apache module should do that job. For a more generic solution (and
perhaps anyway, given some crazed robots will suck down your whole site
xty times a day, if allowed) a firewall with pipe/queue management, like
Jeff's pf+altq, or ipfw+dummynet, can provide more fine-grained control.
More information about the freebsd-questions