[OT] This feels wrong (pthreads question)
jayce at lug-nut.com
Tue Jan 30 08:30:13 MST 2007
On Monday 29 January 2007 16:29, Daniel C. wrote:
> I thought at first that the processes were threads, but then I thought
> about it and wondered whether I was correct or not.
This can be true, false, and both at the same time, simply depending on your
apache version and configuration. As of Apache 2.0 you have had various
MPM's which you can use, that define this setup. The default Unix setup is
the one used in Apache 1.x that is a basic prefork model. Each 'thread' is
simply a forked process. You have a configuration option as to how many it
will fork ahead of time, how many are in reserve, and up to what point it can
spawn new processes on demand if needed.
In the goals of flexibility and cross-platform friendliness, several other
MPM's were added, such as a pure-threading model which increased performance
in windows, but is usable on unices (no real reason though). As well as a
pure threaded, there is a popular worker MPM that is a hybrid model,
preforking a set number of processes, each with a thread pool of it's own.
Googling around will find the pros and cons of each of these models, with
their numerous caveats.
More information about the PLUG