Skip to content

PHP Performance Tuning

ConfigPHP RPS (wp-login.php)Behavior
Default (CHILDREN=1)~5 rpsFork on demand, cold start ~1s
CHILDREN=10~15-20 rpsPre-forked pool, no cold start
Apache PHP-FPM~16 rpsPre-forked pool (reference)

Add to your OLS httpd_config.conf extprocessor section:

extProcessor lsphp {
env PHP_LSAPI_CHILDREN=10
env PHP_LSAPI_MAX_IDLE=300
}

OLS uses lsphp via the LSAPI protocol. By default, a single lsphp process starts and forks new workers on demand. Each fork must load all PHP extensions and WordPress plugins (~1 second per cold start).

Setting PHP_LSAPI_CHILDREN=10 pre-starts 10 workers, eliminating cold-start latency and matching Apache PHP-FPM throughput.