Repository navigation
Conversation
…tion (v6) - apache variant: keep-alive off, up to 20 mod_php processes (was On and 150) - fpm variant: 10 PHP-FPM workers (was 5), built-in Apache up to 1024 threads (was 150) - ListenBacklog 4096 (was 511) The capacity benchmark measured these settings with 30 mod_php processes and 16 MB pages; the tuning simulator gives 20 processes for business applications of 64 to 128 MB per request, which run out of memory with 30 in a traffic peak.
mistraloz
force-pushed
the
feat/v6-apache-fpm-defaults
branch
from
November 13, 2026 04:28
a5657b9 to
addd522
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The v5 defaults do not fit a typical application: keep-alive holds the mod_php processes, 150 mod_php processes of 100 MB exhaust a 2-4 GB container in a traffic peak, and 5 PHP-FPM workers leave CPU idle when the requests wait for a database.
What
APACHE_KEEPALIVEAPACHE_MAX_REQUEST_WORKERSPHP_FPM_PM_MAX_CHILDREN(start, spare)APACHE_MAX_REQUEST_WORKERS(threads)ListenBacklogThe benchmark measured 30 mod_php processes with 16 MB pages. The tuning simulator gives 20 for business applications of 64-128 MB per request: 30 run out of memory in a peak, 20 still saturate the CPU behind a reverse proxy. The simulator of this branch uses these defaults.
Tests
variant-apache.sh(12) andvariant-fpm.sh(21) pass on PHP 8.4.