Date: Thu, 3 Apr 1997 15:57:08 +0200 (MET DST) From: Guido van Rooij <guido@gvr.win.tue.nl> To: FreeBSD-hackers@freebsd.org (FreeBSD-hackers) Subject: apache like preforking apps and high loads Message-ID: <199704031357.PAA10893@gvr.win.tue.nl>
next in thread | raw e-mail | index | archive | help
When looking at Apacha like applications, one often sees extermely high load averages. Apache preforks a number of processes that all block on accept(). When a request comes in, all process are woken up and the scheduler chooses one of the now runnable processes taht will succeed in the accept(). The other go back to sleep. There is a max amount of free processes (i.e.e processes doing an accept) and a min amunt. When less the minimum amount of processes are available, new ones are forked. When more then the maximum are available, some are killed. Now, as told, I regularly see loads like 20 on an otherwise idle machine, causing e.g. sendmail to not deliver mail anymore. One could argue that then the values of min and max above are wrong, but that is not completely true. These values should be optimised for those times where the amount of connections is the highest. But it will bite you when the server is relatively idle. My proposition would be to dynamically set the values of min and max according to the current load profile on the server. If the amount of connections in the last minut (or so) is 20, min should be set to 20 and max to 2*min. Of course we will still have the already present `real maximum' where max<`real maximum'. I'm wondering if this is the right approach...Waht do you guys think? -Guido
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704031357.PAA10893>