-->

Prefork Multi Processing Module for Apache

MPM stands for Multi Processing Module and this module implements a non-threaded pre-forking web server.

MPM isolate each request , so single request wont effect any other request.

MaxRequestWorkers is proportional to Physical RAM. More value more requests so make sure we got more RAM available for that server.

=====How it Works

There is a process named as "Control Process" and it is responsible for launching child process and these child processes will listen for requests and serve them once they arrive. And Apache by default will maintain serveral spare child process so that client request doesn't have to wait until new child process created.

And following parameters are responsible for regulating these child process.
1. StartServers
2.MinSpareServers
3.MaxSpareServers
4.MaxRequestWorkers

The default value for MaxRequestWorkers is 256 , so a server with untouched MaxRequestWorkers parameter can handle 256 requests at a time and you can define your custom value according to your requirement but this proportioanl to availablity of RAM.

To have apache process to bind with port 80 , main parent process will start with root user
but all child process with start with apache to have limited access but all the content that should serve by child process should let them access it. So if some content not accessible , check whether child process which are owned by apache user&group authorized to access that content or not. Noob style just check that folder got owner ship for apache or not.

MaxConnectionsPerChild : Once a child process created , how many requests it can serve before it get killed.

MaxSpareServers Directive
-------------------------

This is the parameter to specify number of spare connection apache control process should create.
Default value is 10 and syntax is as below

Syntax: MaxSpareServers 10

If MaxSpareServers < MinSpareServers , then apache will adjust it MinSpareServers+1 automatically.

If MaxSpareServers > current Idle child/spare process then apache will kill those excessive spare process.

NOTE:
1. Dont ever set this value to a large number
2. If your website is a very busy website, turning off this is a good idea.

MinSpareServer Directive
------------------------

Syntax: MinSpareServers 5

This is the minimum threshold value of number of spare connections. If apache has found less number of spare connection than minimum threshold connections then it will create connections in per socond manner. like

1st second 2^0 connections
2nd second  2^1 connections
3rd second  2^2 connections 

like this it will move till creating 32 connections per second and once it reaches minimum spare connection threshold apache will stop creating spare connections.

Note:
1. Can turn off if your website is a very busy one.
2. Never set this parameter to a large number.

StartServers Directive
----------------------

Syntax: StartServers number

Number of child process should create at the time of Apache startup. And the default differs from
MPM to MPM.

Workder MPM has default value     3
Event  3
prefork                                             5
mpmt_os2                                       2





Share on Google Plus

About RAJA SEKHAR REDDY GENUPULA

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.