From owner-freebsd-questions@FreeBSD.ORG Mon Apr 14 22:33:14 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 AE9E3106564A for ; Mon, 14 Apr 2008 22:33:14 +0000 (UTC) (envelope-from patsy@ethernull.org) Received: from purity.ethernull.org (81-86-45-156.dsl.pipex.com [81.86.45.156]) by mx1.freebsd.org (Postfix) with ESMTP id CB0538FC0C for ; Mon, 14 Apr 2008 22:33:13 +0000 (UTC) (envelope-from patsy@ethernull.org) Received: from purity.ethernull.org (patsy@localhost.ethernull.org [127.0.0.1]) by purity.ethernull.org (8.14.1/8.14.1) with ESMTP id m3EMFlvP017514; Mon, 14 Apr 2008 22:15:48 GMT Received: (from patsy@localhost) by purity.ethernull.org (8.14.1/8.14.1/Submit) id m3EMFjTb000859; Mon, 14 Apr 2008 22:15:46 GMT Date: Mon, 14 Apr 2008 22:15:45 +0000 From: David Kaye To: freebsd-questions@freebsd.org Message-ID: <20080414221544.GA10126@purity.ethernull.org> References: <4801E33E.1030805@ethernull.org> <4801FE69.3080908@otenet.gr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4801FE69.3080908@otenet.gr> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd@ethernull.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: Mon, 14 Apr 2008 22:33:14 -0000 On 0, Manolis Kiagias wrote: > Patsy wrote: >> >> 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. >> >> Patsy >> > > I run something similar here in Greece, but have not noticed any > performance problems just yet. You are probably getting a lot of hits! > > What you need is an apache module designed specifically for speed / > bandwidth throttling: www/mod_cband > > You may also wish to have a look at these instructions (linux specific, but > easy to adjust for FreeBSD): > > http://howtoforge.com/mod_cband_apache2_bandwidth_quota_throttling > > BTW, what is your ADSL speed? You mention upload capacity of 500kb/s, and I > suppose you mean kbits/sec, *not* kbytes/sec. Assuming it is kbits, you may > well be consuming all your upload bandwidth if for some reason you get more > than a few simultaneous connections... My estimated upload speed is 500kilobits per second. mod_cband seems to do the trick perfectly. I set maximum global upload to 400kilobits per second and all seems to be working well. Just as a side note for anyone S'ing the FA's, when I ran: #pkg_add -r mod_cband it pulled down a version of mod_cband compiled for Apache 2.0, with Apache 2.0 therefore being a dependancy, it was pulled down as well. After I removed 2.0, I needed to reinstall 2.2 and make mod_cband from ports. None of this was a problem, I just thought it should be on the list somewhere. Many thanks to everybody who responded. Patsy