Apache mpm_event_module

Hello everyone,

I recently switched from Centos 7 to Rocky Linux 9.1. I’m trying to understand how best to optimize Apache (currently installed version is 2.4.53). I saw that the mpm_event_module module is active, which as far as I understand should allow me to configure some parameters such as:

ThreadsPerChild
ServerLimit
AsyncRequestWorkerFactor
MaxRequestWorkers
idle_workers
max_connections

However, I can’t find the config file with the default values (which I’ve seen exist on other distributions). Can anyone tell me if there is a specific configuration file that I can edit? If I don’t change anything, what are the current defaults Apache is using on Rocky Linux 9.1?

I’m sorry but I’ve just started gaining experience with this version of Apache.

Thank you

Hi, the file you are looking for is /etc/httpd/conf.modules.d/00-mpm.conf and I added to this:

<IfModule mpm_event_module>
	ServerLimit		16
	StartServers		8
	MinSpareThreads		25
	MaxSpareThreads		75
	ThreadLimit		64
	ThreadsPerChild		25
	MaxRequestWorkers	400
	MaxConnectionsPerChild  3000
</IfModule>

for example. I put this under the line that loads the module for mpm_event. Obviously you can set what appropriate options you need than my example. You can verify config changes before restarting Apache with:

apachectl configtest

Thank you, do you know the default values of all that settings?

From the official documentation it would appear that the defaults values are:

<IfModule mpm_event_module>
    StartServers             3
    MinSpareThreads          75
    MaxSpareThreads          250
    ThreadLimit              64
    ThreadsPerChild          25
    MaxRequestWorkers        400
    MaxConnectionsPerChild   0
</IfModule>