1

I am googling around and finding myself going down a rabbit hole and getting nowhere.

My over all goal is to limit the number of connections that can be made at the same time to Apache on a Centos 7 server.

With the default setting:

[root@app1 ~]# cat /etc/httpd/conf.modules.d/00-mpm.conf
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
#LoadModule mpm_worker_module modules/mod_mpm_worker.so
#LoadModule mpm_event_module modules/mod_mpm_event.so

[root@app1 ~]# httpd -t -D DUMP_MODULES | grep mpm
 mpm_prefork_module (shared)

[root@app1 ~]# httpd -V | grep MPM
Server MPM:     prefork

If I run:

[root@app1 ~]# ab -n 200 -c 100 http://afterratest.com/

I can see about 135 connections coming in.

If i set the following setting in the httpd.conf file

KeepAlive Off
<IfModule prefork.c>
   StartServers        5
   MinSpareServers     5
   MaxSpareServers     100
   MaxClients          100
   MaxRequestsPerChild 3000
</IfModule>

Restart Apache and run the same command I can see 100 connections.

What I am hoping to get form this question is:

  1. What is the difference between mpm_prefork_module, mpm_worker_module and mpm_event_module

I have read the docs online and they do not make sense.

  1. What do the following setting do for each?

    StartServers 5

    MinSpareServers 5

    MaxSpareServers 100

    MaxClients 100

    MaxRequestsPerChild 3000

Explain it like I am 5

James Connigan
  • 137
  • 2
  • 12

0 Answers0