Apache’s Multi-Processing Modules (MPMs) determine how it handles concurrent connections, and picking the right one has a bigger performance impact than most individual config tweaks.
The Three MPMs
- prefork — one process per connection, no threading. Required for mod_php (non-thread-safe), but memory-heavy under high concurrency.
- worker — multiple threads per process. Better concurrency than prefork, but incompatible with mod_php.
- event — worker’s successor, handles keep-alive connections more efficiently. The modern default for most setups.
apache2ctl -M | grep mpm # check which MPM is active # Switch to event MPM (requires PHP-FPM instead of mod_php, since # event/worker aren't compatible with the older mod_php) sudo a2dismod mpm_prefork php8.3 sudo a2enmod mpm_event proxy_fcgi setenvif sudo a2enconf php8.3-fpm sudo systemctl restart apache2
The practical upshot: running PHP via PHP-FPM (instead of the older mod_php) unlocks the event MPM, which handles significantly more concurrent connections with less memory than prefork — a meaningful, often overlooked performance win on any Apache+PHP server.