From owner-freebsd-questions@FreeBSD.ORG Sun Apr 13 14:27:47 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C772106566B for ; Sun, 13 Apr 2008 14:27:47 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from gaia.nimnet.asn.au (nimbin.lnk.telstra.net [139.130.45.143]) by mx1.freebsd.org (Postfix) with ESMTP id 1D8EF8FC1B for ; Sun, 13 Apr 2008 14:27:45 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from localhost (smithi@localhost) by gaia.nimnet.asn.au (8.8.8/8.8.8R1.5) with SMTP id AAA04197; Mon, 14 Apr 2008 00:27:32 +1000 (EST) (envelope-from smithi@nimnet.asn.au) Date: Mon, 14 Apr 2008 00:27:31 +1000 (EST) From: Ian Smith To: Patsy In-Reply-To: <20080413120013.E26BD1065704@hub.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-questions@freebsd.org Subject: Re: Limiting apache's upload speed? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2008 14:27:47 -0000 On Sun, 13 Apr 2008 11:41:02 +0100 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. 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