Discover Centmin Mod today
Register Now

Master Branch allow adjusting PHP-FPM FPM_MAX_SPAWN_RATE in 123.09beta01

Discussion in 'Centmin Mod Github Commits' started by eva2000, Mar 31, 2021.

  1. eva2000

    eva2000 Administrator Staff Member

    46,677
    10,598
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,446
    Local Time:
    9:07 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    allow adjusting PHP-FPM FPM_MAX_SPAWN_RATE in 123.09beta01

    - optionally allow end users to alter and adjust the PHP-FPM hardcoded FPM_MAX_SPAWN_RATE from default value of 32 max which limits how many additional dynamic PHP-FPM child processes can be spawned every 1 second. This means if you have set PHP-FPM process manager away from Centmin Mod default of pm = ondemand to pm = dynamic in /usr/local/etc/php-fpm.conf so you dynamically spawn PHP-FPM child processes, then it would take 30 seconds total to spawn 920 PHP-FPM child processes accounting for 2x spawn algorithm growth factor. So 1 second 8 additional PHP-FPM child processes spawned, then 2 seconds, 16 additional PHP-FPM child processes spawned, 3 seconds, 32 additional PHP-FPM child processes spawned, 4th second, 32 additional PHP-FPM child processes spawned - all the way to 30 seconds where 920 additional PHP-FPM child processes are spawned.
    - for PHP versions 8.0.x and below, to adjust the hardcoded FPM_MAX_SPAWN_RATE from default value of 32, you can set in persistent config file /etc/centminmod/custom_config.inc the variable FPM_MAX_SPAWN_RATE='64' to raise max value from 32 to 64 before running centmin.sh menu option 5 PHP recompilation/upgrades.
    - PHP 8.1.x development versions will not need this adjustment as PHP 8.1.x added a PHP-FPM config variable to adjust this, pm.max_spawn_rate in /usr/local/etc/php-fpm.conf. Centmin Mod 123.09beta01 currently doesn't support or has been tested with PHP 8.1.x dev versions as yet.
    - FPM_MAX_SPAWN_RATE generally won't need adjusting for most users considering it is used only for non-default Centmin Mod PHP-FPM pm = dynamic mode and you'd need alot of high traffic PHP-FPM requests and alot of cpu threads and server memory availability to handle the larger spawn rate effectively.

    Continue reading...

    Centmin Mod Github Master branch

    Master branch is where most recent commits are made as at May 24, 2015.