Appendix C. Multi-processing modules (MPMs)


Red Hat JBoss Core Services includes a variety of multi-processing modules (MPMs). You can use these MPMs to customize how the Apache HTTP Server responds to incoming requests.

C.1. MPMs overview

Multi-processing modules (MPMs) are available for both Red Hat Enterprise Linux and Microsoft Windows.

MPMs for Red Hat Enterprise Linux

prefork
The prefork MPM implements a non-threaded, pre-forking web server. A single control process is responsible for launching child processes, which listen for incoming connections and service them when they arrive. Each request is handled by a single process, ensuring that each request is isolated, and will not affect any other requests.
worker
The worker MPM implements a hybrid multi-process, multi-threaded server. Each child process creates a fixed number of server threads, allowing the server to handle a large number of requests with fewer system resources.
event
The event MPM is based off the worker MPM, but allows additional requests to be served simultaneously by passing off some processing work to the listener threads, therefore freeing up the worker threads to serve new requests.

MPMs for Microsoft Windows

winnt
The winnt MPM is the only one available for Windows systems. It uses a single control process, which launches a single process used to create threads for incoming requests.

C.2. Switching the MPM

The server selects the MPM based on the LoadModule directives in the JBCS_HOME/httpd/conf.modules.d/00-mpm.conf file. You can select a specific MPM by removing the comment character (#) from the LoadModule directive for that MPM in the 00-mpm.conf file.

By default, the prefork MPM is selected. For example:

# prefork MPM: Implements a non-threaded, pre-forking web server
# See: http://httpd.apache.org/docs/2.4/mod/prefork.html
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

Procedure

  1. Edit the JBCS_HOME/httpd/conf.modules.d/00-mpm.conf to add a comment (#) character to the LoadModule directive for the prefork MPM. For example:

    # prefork MPM: Implements a non-threaded, pre-forking web server
    # See: http://httpd.apache.org/docs/2.4/mod/prefork.html
    #LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
  2. In the same 00-mpm.conf file, remove the comment (#) character from the LoadModule directive for the MPM that you want to switch to. These lines are located immediately below the prefork MPM.

    For example, to load the worker MPM, remove the comment (#) character from the LoadModule directive for the worker MPM:

    # worker MPM: Multi-Processing Module implementing a hybrid
    # multi-threaded multi-process web server
    # See: http://httpd.apache.org/docs/2.4/mod/worker.html
    LoadModule mpm_worker_module modules/mod_mpm_worker.so
  3. To verify the MPM is configured correctly, enter the following command:

    $ sbin/apachectl -V

    This command displays the current MPM. For example:

    Server MPM:     worker
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.