Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 04 Dec 2005 16:23:41 +1100
From:      Norberto Meijome <freebsd@meijome.net>
To:        "N.J. Thomas" <njt@ayvali.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: overloaded webserver: nfs wait issue?
Message-ID:  <43927D5D.5020909@meijome.net>
In-Reply-To: <20051202012316.GD8773@ayvali.org>
References:  <20051201193813.GG15171@ayvali.org> <438F9019.7020309@meijome.net> <20051202012316.GD8773@ayvali.org>

next in thread | previous in thread | raw e-mail | index | archive | help
N.J. Thomas wrote:
> * Norberto Meijome <freebsd@meijome.net> [2005-12-02 11:06:49 +1100]:
> 
>>What's your MaxClients set to?
> 
> 
> It was set to 256, we actually lowered it to 180.

I would have thought you'd want to increase it (after configuring 
everything else)...else you'll get all those nasty "server too busy" errors.

> Running wc -l on the daily Apache access logs, I get: ~1.8million hits
> per day 

cool. you should most definitely be able to serve that much (with an 
http service that is properly configured). Apache should do fine.

>>I dont think i can give much advice on the NFS side of things but in the 
>>meantime I would :
>> - increase # of MaxClients (the default is RIDICULOUSLY small, 
>>specially in 1.3. You will probably have to recompile with a new max.
> 
> 
> Higher than 256?

yes. IIRC, I've had apache 1.3 configured to over maxclients 1500 with 
about hardware. Your hardware + OS will set some limits (which you 
should modify as needed of course), but you should definitely be able to 
have more than 256.

>> - You RAM seems OK ... you may want to tweak some sysctl or memory 
>>settings in Apache (I seem to remember in 1.3 some to do with MMap,  but 
>>i could be wrong) ... or just add more RAM. Check vmstat (or systat -vm 
>>1) to see how much swapping is going on.
> 
> 
> Will do...thanks for the suggestions.
> 

np

btw, i think i forgot to mention you should look into changing to 
KeepAlive OFF (you want to serve a file and free up the apache resources 
for the next request - you trade off a bit of speed on each client's 
transaction, but overall you should see a great improvement. If you dont 
want to kill http keepalive altogether, set the timeout to a short 
timeframe (1 minute? 30 secs).

good luck,
Beto



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43927D5D.5020909>