In a process-based server, the server forks several children. Forking means that a parent process makes identical copies of itself, called children. Each one of the children can serve a request independently of the others. This approach has the advantage of improved stability; if one of the children misbehaves, for example, by leaking memory, it can be killed without affecting the rest of the server. The increased stability comes with a performance penalty: Each one of the children occupies additional memory, and the operating system spends a certain amount of time in context switching. In addition, this approach makes inter-process communication and data sharing difficult. Apache 1.3 is a process-based server and Apache 2 provides a prefork MPM that allows it to perform as a process-based server. Prefork means that children can be forked at startup, instead of when a request comes. Apache allows you to configure the number of children to fork at startup and the maximum number of possible children, as described in the next section. |