Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Apr 2008 00:27:31 +1000 (EST)
From:      Ian Smith <smithi@nimnet.asn.au>
To:        Patsy <freebsd@ethernull.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Limiting apache's upload speed?
Message-ID:  <Pine.BSF.3.96.1080413232927.27861A-100000@gaia.nimnet.asn.au>
In-Reply-To: <20080413120013.E26BD1065704@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 13 Apr 2008 11:41:02 +0100 Patsy <freebsd@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.

cheers, Ian




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.1080413232927.27861A-100000>