overloaded webserver: nfs wait issue?
freebsd at meijome.net
Sat Dec 3 21:23:47 PST 2005
N.J. Thomas wrote:
> * Norberto Meijome <freebsd at 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.
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).
More information about the freebsd-questions