Rocky 9.x Configure apache web server for concurrency
Home > Rocky Linux or CentOS > Rocky Linux 9.x > Web Servers > Apache > Configure for concurrency
Concurrency is handled via mpm module. There are different types of mpm modules out of which only one can be used at a time. We can see currently enabled mpm module via:
httpd -V | grep -i mpm
We can see which line is uncommented in '/etc/httpd/conf.modules.d/00-mpm.conf' to validate which mpm module is enabled.
Event MPM configuration
To configure the enabled mpm module use something similar to below in '/etc/httpd/conf.modules.d/10-mpm-event.conf':
<IfModule mpm_event_module>
ServerLimit 1000
StartServers 100
MinSpareThreads 400
MaxSpareThreads 600
ThreadLimit 256
ThreadsPerChild 128
MaxRequestWorkers 750
MaxClients 8000
MaxRequestsPerChild 10000
</IfModule>
Prefork MPM configuration
To configure the enabled mpm module use something similar to below in '/etc/httpd/conf.modules.d/10-mpm-event.conf':
<IfModule mpm_prefork_module>
ServerLimit 1000
StartServers 100
MinSpareServers 20
MaxSpareServers 100
MaxRequestWorkers 750
MaxClients 750
MaxRequestsPerChild 10000
</IfModule>
Note that I have not included LoadModule lines in above config. So these can be appended in existing configuration without removing the LoadModule related lines.
Refer:
- https://serverfault.com/questions/775855/how-to-configure-apache-workers-for-maximum-concurrency
- https://httpd.apache.org/docs/current/mod/event.html
- https://httpd.apache.org/docs/current/mod/worker.html
Home > Rocky Linux or CentOS > Rocky Linux 9.x > Web Servers > Apache > Configure for concurrency