Keepalive | SSL


IBM HTTP Server Threads


+

Search Tips   |   Advanced Search


Overview

Apache 2.0 is a thread-based Web server.

Apache 1.3 is a thread-based Web server on the Windows platform. It is a process-based Web server on all UNIX and Linux platforms. This means that it implements the multi-process, single-thread process model: for each incoming request, a new child process is created or requested from a pool to handle it.

However, Apache 2.0, and therefore IBM HTTP Server V6.0 as well, is now a fully thread-based Web server on all platforms. This gives you the following advantages:

On the UNIX platform, Apache 2.0 also allows you to configure more than one process to be started. This means that the thread model is then changed to multi-process, multi-thread.


Multi-Processing Modules (MPM) architecture

Apache 2.0 achieves efficient support of different operating systems by implementing a Multi-Processing Modules (MPM) architecture, allowing it, for example, to use native networking features instead of going through an emulation layer in Version 1.3.

MPMs are chosen at compile time and differ for each operating system, which implies that the Windows version uses a different MPM module from the AIX or Linux version. The default MPM for Windows is mpm_winnt, whereas the default module for AIX is mpm_worker.

To identify if MPM is compiled into an Apache 2.0 Web server, run the command...

apachectl -l

...which prints out the module names. Look for a module name worker, or a name starting with the mpm prefix.

# ./apachectl -l
Compiled in modules:
  core.c
  worker.c
  http_core.c
  mod_suexec.c
  mod_so.c

The modules are:

The mpm_worker module has proven efficient in many configurations.


IBM Recommendations

This section gives you configuration tips for the UNIX platforms and provides a good starting point for Web server tuning for WebSphere Commerce. Keep in mind that every system and every site has different requirements, so make sure to adapt these settings to your needs.

The maximum number of processes that can be launched is set by the ServerLimit directive.

Using a ThreadsPerChild value greater than 512 is not recommended on the Linux and Solaris platform. If 1024 threads are needed, the recommended solution is to increase the ServerLimit value to 2 to launch two server processes with 512 threads each. One or few server processes are best, except Solaris. The ThreadsPerChild should not exceed 500 for Linux, but only 25-100 for Solaris.


Threads and Keepalive

Keepalive sockets require threads to block on them during their lifetime. Therefore, you need to carefully balance the number of sockets, the socket time outs, and the number of threads on each Web server. Too many threads might lead to memory thrashing, too few threads could lead to all threads blocking on idle keepalive connections, forcing new connections to queue waiting for a thread to become available.