process-model.html revision db81e057b060e365d840d9a1d35a5797192efa81
02c335c23bf5fa225a467c19f2c063fb0dc7b8c3Timo Sirainen<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen<HTML><HEAD>
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen<TITLE>Server Pool Management</TITLE>
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen</HEAD>
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen<BODY
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen BGCOLOR="#FFFFFF"
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen TEXT="#000000"
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen LINK="#0000FF"
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen VLINK="#000080"
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen ALINK="#FF0000"
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen>
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen<!--#include virtual="header.html" -->
77bc2bda5b781c4ffddc8a74b175cf32e9e2c2ecTimo Sirainen<H1 ALIGN="CENTER">Server Pool Management</H1>
77bc2bda5b781c4ffddc8a74b175cf32e9e2c2ecTimo Sirainen
77bc2bda5b781c4ffddc8a74b175cf32e9e2c2ecTimo Sirainen<HR>
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen<P>
40a5aeebf6b4858b93f0ddff0bf12fba769cf903Timo SirainenWe found that many people were using values for "MaxServers" either
40a5aeebf6b4858b93f0ddff0bf12fba769cf903Timo Sirainentoo high or too low, and were hanging themselves on it. The model we
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainenadopted is still based on long-lived minimal-forking processes, but
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Siraineninstead of specifying one number of persistent processes, the
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainenweb-master specifies a maximum and minimum number of processes to be
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen"spare" - every couple of seconds the parent checks the actual number
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainenof spare servers and adjusts accordingly. This should keep the number
4ee00532a265bdfb38539d811fcd12d51210ac35Timo Sirainenof servers concurrently running relatively low while still ensuring
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainenminimal forking.
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen<P>
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo SirainenWe renamed the current StartServers to MinSpareServers, created
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainenseparate StartServers parameter which means what it says, and renamed
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo SirainenMaxServers to MaxSpareServers (though the old name still works, for
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo SirainenNCSA 1.4 back-compatibility). The old names were generally regarded
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainenas too confusing.
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen<P>
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo SirainenThe defaults for each variable are:
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen<PRE>
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo SirainenMinSpareServers 5
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo SirainenMaxSpareServers 10
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo SirainenStartServers 5
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen</PRE>
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainen
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo SirainenThere is an absolute maximum number of simultaneous children defined
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainenby a compile-time limit which defaults to 256 and a "MaxClients"
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainendirective which specifies the number of simultaneous children that
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62Timo Sirainenwill be allowed. MaxClients can be adjusted up to the compile-time
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainenlimit (HARD_SERVER_LIMIT, defined in httpd.h). If you need more
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainenthan 256 simultaneous children, you need to modify both HARD_SERVER_LIMIT
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainenand MaxClients.<P>
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenIn versions before 1.2, HARD_SERVER_LIMIT defaulted to 150.<P>
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenWe do not recommend changing either of these values unless:
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen<OL>
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen<LI>You know you have the server resources to handle more
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen<LI>You use the machine for other purposes and must limit the amount of memory
1279090ba03f9c176976a69ab7718f0ed77b19afTimo SirainenApache uses
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen</OL>
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen<!--#include virtual="footer.html" -->
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen</body></html>
23bdbb7b1831785c6ba6df190f6369da882d2b9dTimo Sirainen
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen
1279090ba03f9c176976a69ab7718f0ed77b19afTimo Sirainen