*BSD News Article 70079


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!news.sdsmt.edu!news.mid.net!mr.net!winternet.com!nntp.primenet.com!news.cais.net!news1.erols.com!newsmaster@erols.com
From: Ken Bigelow <kbigelow@www.play-hookey.com>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: BandWidth Limitation on Apache???
Date: Mon, 03 Jun 1996 20:50:06 -0700
Organization: Erols Internet Services
Lines: 37
Message-ID: <31B3B26E.7E6@www.play-hookey.com>
References: <4otkm1$i2u@mirage.nlink.com.br>
Reply-To: kbigelow@www.play-hookey.com
NNTP-Posting-Host: kenjb05.play-hookey.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.0b4 (Win16; I)

Luiz de Barros wrote:
> 
> Dear FreeBSD Experts,
> 
> Is there any way of limitting the bandwidth alocated for each httpd
> session? Our internet<-our network channel is getting overload by
> lots of people accessing home-pages.
> I would like for example to alocate 0.5Kbps for each apache session, as
> our 64k line is most of the day overloaded.
> 
> Luiz de Barros

I suggest you look at the problem from another angle -- your proposed 
action is not likely to help you.

If your site is that popular, there are probably lots of people trying to 
access your site but failing to get through before timeout occurs. Thus, if 
you cut you bandwidth per session in half, you will wind up with twice as 
many sessions, each operating at half speed.

If you really want to limit the number of accesses to your site, recompile 
Apache after going into the httpd.h header file and reducing the value of 
DEFAULT_SERVER_LIMIT (originally defined as 150). I got the full Apache 
1.0.5 system from http://www.apache.org and reconfigured it for my 
preferences -- not an excessive project.

Of course, any of these actions will make your clients unhappy. If you want 
or need them to keep using your system, the better answer is to upgrade 
your line to 128K. (I know, it's expensive. You'll have to figure your own 
priorities.) Then start looking at a T1.

Sorry I can't offer you a less expensive answer, but let's face it: a 
popular site is popular because people keep using it. I rather imagine that 
this won't change no matter what you do, and your bandwidth will always be 
filled from step to gudgeon.

Ken