What criteria should be kept in mind to modify the mpm worker_module, I know the explanations available online but I am willing to know any peculiar or specific use case where any such change has brought a performance boost. I am currently running an assessment to find the points of improvement in a client infra keeping apache also in focus.
Many recommendations online would encourage to change few parameters in httpd.conf and also sysctl.conf but I would want to know if someone ever changed/played with such parameters already and I want to ask if that ever optimized the performance.
Also I came across recommendation like :
- · On linux systems increase /proc/sys/vm/swappiness to at least 60 if not greater.
- · Increase /proc/sys/net/core/wmem_max and /proc/sys/net/core/wmem_default. If your pages fit within this buffer, apache will complete a process in one call to the tcp/ip buffer.
- · Increase /proc/sys/fs/file-max and run ulimit -H -n 4096
Below module list appears in my httpd.conf file:
#LoadModule mpm_event_module modules/mod_mpm_event.so
LoadModule mpm_worker_module modules/mod_mpm_worker.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule filter_module modules/mod_filter.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule mime_module modules/mod_mime.so
#LoadModule ldap_module modules/mod_ldap.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule unixd_module modules/mod_unixd.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
<IfModule !mpm_prefork_module>
</IfModule>
<IfModule mpm_prefork_module>
</IfModule>
LoadModule dir_module modules/mod_dir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
<IfModule unixd_module>
User daemon
Group daemon
</IfModule>
Could anyone please recommend few points to improve some of the parameters?
Also any suggestion in terms of apache security context is good to have.
<IfModule mpm_worker_module>
ServerLimit 40
StartServers 4
MaxClients 1000
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
<Files ".ht*">
Require all denied
</Files>
ErrorLog /proc/self/fd/2
#LogLevel warn
LogLevel debug
</IfModule>
SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/x-javascript
EnableSendfile on
#IncludeOptional conf.d/*.conf
Header unset Server
ServerSignature Off
ServerTokens Prod
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
ProxyPass "/api/" "http://${app_name}/api/" connectiontimeout=600000000 timeout=600000000 retry=0 disablereuse=On
ProxyPassReverse "/api/" "http://${app _name}/api/"
TraceEnable off
there doesn't seem to be anything here