event.xml revision 5134273c2ebd6e114a62c905e2e945d8062ae3ee
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd<!-- $LastChangedRevision$ -->
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd Licensed to the Apache Software Foundation (ASF) under one or more
6df89e6e4adeb986b41b7ec6b7593a887e031ce7nd contributor license agreements. See the NOTICE file distributed with
6df89e6e4adeb986b41b7ec6b7593a887e031ce7nd this work for additional information regarding copyright ownership.
7add1372edb1ee95a2c4d1314df4c7567bda7c62jim The ASF licenses this file to You under the Apache License, Version 2.0
7add1372edb1ee95a2c4d1314df4c7567bda7c62jim (the "License"); you may not use this file except in compliance with
7add1372edb1ee95a2c4d1314df4c7567bda7c62jim the License. You may obtain a copy of the License at
7add1372edb1ee95a2c4d1314df4c7567bda7c62jim Unless required by applicable law or agreed to in writing, software
52fff662005b1866a3ff09bb6c902800c5cc6dedjerenkrantz distributed under the License is distributed on an "AS IS" BASIS,
7add1372edb1ee95a2c4d1314df4c7567bda7c62jim WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7add1372edb1ee95a2c4d1314df4c7567bda7c62jim See the License for the specific language governing permissions and
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd limitations under the License.
ed1d958582984a7c54a6ca859e15939a414fa733nd<description>A variant of the <module>worker</module> MPM with the goal
ed1d958582984a7c54a6ca859e15939a414fa733ndof consuming threads only for connections with active processing</description>
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end <p>The <module>event</module> Multi-Processing Module (MPM) is
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end designed to allow more requests to be served simultaneously by
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd passing off some processing work to supporting threads, freeing up
52fff662005b1866a3ff09bb6c902800c5cc6dedjerenkrantz the main threads to work on new requests. It is based on the
a29610af88e278144045bfa1bc63b4a1a4b5ff14trawick multi-process multi-threaded server. Run-time configuration
52fff662005b1866a3ff09bb6c902800c5cc6dedjerenkrantz directives are identical to those provided by
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd <code>--with-mpm=event</code> to the <program>configure</program>
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd script's arguments when building the <program>httpd</program>.</p>
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd<seealso><a href="worker.html">The worker MPM</a></seealso>
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd <p>This MPM tries to fix the 'keep alive problem' in HTTP. After a client
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd completes the first request, the client can keep the connection
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd open, and send further requests using the same socket. This can
63581ee088272ef76aa8d053609dc1705c222deesf save signifigant overhead in creating TCP connections. However,
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd Apache HTTP Server traditionally keeps an entire child process/thread waiting
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd for data from the client, which brings its own disadvantages. To
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd solve this problem, this MPM uses a dedicated thread to handle both
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd the Listening sockets, all sockets that are in a Keep Alive state,
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd and sockets where the handler and protocol filters have done their work
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd and the only remaining thing to do is send the data to the client. The
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd status page of <module>mod_status</module> shows how many connections are
4af55bbfdbff2cae0cd3195876c93ea991523d1fcolm in the mentioned states.</p>
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd <p>The improved connection handling does not yet work for certain
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd connection filters, in particular SSL. For SSL connections, this MPM will
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd fall back to the behaviour of the <module>worker</module> MPM and
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd reserve one worker thread per connection.</p>
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd <p>The MPM assumes that the underlying <code>apr_pollset</code>
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd implementation is reasonably threadsafe. This enables the MPM to
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd avoid excessive high level locking, or having to wake up the listener
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd thread in order to send it a keep-alive socket. This is currently
38819b9bf8b10d6db4842fb5a4ede7828b409819rbowen only compatible with KQueue and EPoll.</p>
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd compare-and-swap operations for thread synchronization. If you are
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd compiling for an x86 target and you don't need to support 386s, or
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd you are compiling for a SPARC and you don't need to run on
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd pre-UltraSPARC chips, add
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd <program>configure</program> script's arguments. This will cause
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd APR to implement atomic operations using efficient opcodes not
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd available in older CPUs.</p>
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd <p>This MPM does not perform well on older platforms which lack good
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd threading, but the requirement for EPoll or KQueue makes this
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd <li>To use this MPM on FreeBSD, FreeBSD 5.3 or higher is recommended.
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd However, it is possible to run this MPM on FreeBSD 5.2.1, if you
e930328445e961ade1bd37ed7ca01c293b586400noodl use <code>libkse</code> (see <code>man libmap.conf</code>).</li>
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd <li>For NetBSD, at least version 2.0 is recommended.</li>
ed1d958582984a7c54a6ca859e15939a414fa733nd <li>For Linux, a 2.6 kernel is recommended. It is also necessary to
ed1d958582984a7c54a6ca859e15939a414fa733nd ensure that your version of <code>glibc</code> has been compiled
7add1372edb1ee95a2c4d1314df4c7567bda7c62jim with support for EPoll.</li>
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end<directivesynopsis location="mpm_common"><name>CoreDumpDirectory</name>
63f06dce77bb2d9b1c5aa5deeb47a1069987fd1end</directivesynopsis>
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd<directivesynopsis location="mpm_common"><name>EnableExceptionHook</name>
9c1260efa52c82c2a58e5b5f20cd6902563d95f5rbowen</directivesynopsis>
7add1372edb1ee95a2c4d1314df4c7567bda7c62jim<directivesynopsis location="mod_unixd"><name>Group</name>
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd</directivesynopsis>