[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linuxperf] tuning MaxClients/throttling servers/wake-one/CPU



More progress from the bleeding edge:

(Reminder: the config here is split static/mod_perl httpd's, with a pretty
CPU-intensive mod_perl script serving ads as an SSI as the probable
bottleneck)

Linux kernel 2.2.9 plus the andrea3 (wake-one) patch seems to do the trick:
can handle hits at a speed which suggests it's pushing the adverser to close
to its observed maximum. (As I said in a previous note, avoid 2.2.8 like the
plague: it trashes HDs - see threads on linux-kernel for details.)

However: (there's always a however, isn't there ...)

When it *does* get overstressed, BOY does it get overstressed.
Once the idle CPU drops to zero (i.e. its spending most of its time
processing advert requests, everything goes unpleasantly pearshaped, with a
load of 400+, and the number of httpd's on both types of server *well* above
MaxClients (in fact, suspiciously close to MaxClients + MinSpareServers).
Spikes in demand can cause this, and once you get into this state, getting
out again under the load of prgressively more backlogging requests is not
easy: in fact from experience the only way is to which the machine out of
the (hopefully short TTL) DNS round-robin while it dies down.

The potentially counterintuitive step at this point is to *REDUCE*
MaxClients, and hope that the tcp Listen queue will handle a load surge.
Experience suggests this does in fact work.

(Aside: this is a perfect case for using something like Eddieware
(http://www.eddieware.org)'s load balancing DNS).
--
Mike Whitaker /  Tel: +44-1733-766619 | Email: mike@cricket.org
CricInfo Ltd /   Fax: +44-1733-346287 | Emergency: mike@sms.cricket.org
Technical   / Mobile: +44-7971-977375 | Mobile: mike@mobile.cricket.org
Manager    / GSM Fax: +44-7970-219651 | Web: http://www.cricket.org/
-
Linuxperf:    Working list for the Linux Performance tuning site
Archive:      http://mail.nl.linux.org/lists/
Web site:     http://www.nl.linux.org/linuxperf/