On April 6, 2011 12:04 , John Hudak <jjhu...@gmail.com> wrote:
Under ubuntu 8.04 I installed, configured, and am running Apache 2.2.8).

5 33 13467 12714 20 0 23904 4200 - S ? 0:00 /usr/sbin/apache2 -k start

My question is: Why all the instantiations of apache2 -k start? I expected to see one.

Because you are using the preform MPM. See the documentation at http://httpd.apache.org/docs/2.2/mod/prefork.html which says,

" A single control process is responsible for launching child processes which listen for connections and serve them when they arrive. Apache always tries to maintain several spare or idle server processes, which stand ready to serve incoming requests. In this way, clients do not need to wait for a new child processes to be forked before their requests can be served."


Doing some investigation I discovered that I have Apache built as multi-process (pre-forked) so I am guessing that these are the suspended processes?

They are not suspended, they are sleeping, waiting for incoming requests.


If so, how many should there be? does this look right?

The number is controlled by the |StartServers <http://httpd.apache.org/docs/2.2/mod/mpm_common.html#startservers>|, |MinSpareServers <http://httpd.apache.org/docs/2.2/mod/prefork.html#minspareservers>|, and |MaxSpareServers <http://httpd.apache.org/docs/2.2/mod/prefork.html#maxspareservers>| directives in your Apache HTTP Server configuration file(s). See the documentation at the URL above.


An ancillary question: the machine serves 4 name-based virtual sites, so would it be better to have Apache built as multiprocess or mult-threaded?

It should not make a difference for most servers. If you have a large number of requests, the worker MPM may be more resource-efficient. However, not all third-party modules are thread safe, and hence may not be usable with the worker MPM; I run the prefork MPM for this reason.


--
  Mark Montague
  m...@catseye.org

Reply via email to