Apache configuration riddle

Ijaaz A. Ullah ijaaz-UwkSZrAjFfdkDLQDXwjzI9BPR1lH4CV8 at public.gmane.org
Fri May 7 21:22:08 UTC 2010


On Fri, May 7, 2010 at 3:40 PM, William Muriithi
<william.muriithi-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:
> Hi
>
> I am just in the process of setting up a low traffic web server to be
> used internally, and in the course of doing it, decided to tighten the
> default configuration - basic security stuff. Its on doing so that got
> to think a little bit about sever pool size regulations and I got the
> impression the default configuration does not make sense.
>
> Basically, my problem is both prefork and worker MPM are enabled. When
> I googled on the topic, these two features seems exclusive.  Prefork
> would be more ideal for system with single or dual CPU. Its apparently
> is also recommended when you are running software which is not thread
> safe. On the other side, workers would be used on system with let say
> more than 8 CPUs
>
> The odd thing though, prefork is statically compiled. This is the
> default rpm shipped with Centos 5. Why do they then offer a
> configuration file that imply you can  enable worker MPM?  How does
> apache handle a configuration file that has both MPM enabled? I am
> missing something obvious?
>
> httpd -l
> Compiled in modules:
>  core.c
>  prefork.c
>  http_core.c
>  mod_so.c
>
>
>
> # prefork MPM
> # StartServers: number of server processes to start
> # MinSpareServers: minimum number of server processes which are kept spare
> # MaxSpareServers: maximum number of server processes which are kept spare
> # ServerLimit: maximum value for MaxClients for the lifetime of the server
> # MaxClients: maximum number of server processes allowed to start
> # MaxRequestsPerChild: maximum number of requests a server process serves
> <IfModule prefork.c>
> StartServers       8
> MinSpareServers    5
> MaxSpareServers   20
> ServerLimit      256
> MaxClients       256
> MaxRequestsPerChild  4000
> </IfModule>
>
> # worker MPM
> # StartServers: initial number of server processes to start
> # MaxClients: maximum number of simultaneous client connections
> # MinSpareThreads: minimum number of worker threads which are kept spare
> # MaxSpareThreads: maximum number of worker threads which are kept spare
> # ThreadsPerChild: constant number of worker threads in each server process
> # MaxRequestsPerChild: maximum number of requests a server process serves
> <IfModule worker.c>
> StartServers         2
> MaxClients         150
> MinSpareThreads     25
> MaxSpareThreads     75
> ThreadsPerChild     25
> MaxRequestsPerChild  0
> </IfModule>
>
>
> William
> --
> The Toronto Linux Users Group.      Meetings: http://gtalug.org/
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
>

Take a look at /etc/sysconfig/httpd this will indicate which MPM is being used.
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list