Want to subscribe to topics you're interested in?
Become a Member

Beta Branch add PHP_TUNING variable and phptuning function

Discussion in 'Centmin Mod Github Commits' started by eva2000, Oct 7, 2017.

  1. eva2000

    eva2000 Administrator Staff Member

    30,196
    6,789
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,144
    Local Time:
    7:28 PM
    Nginx 1.13.x
    MariaDB 5.5
    • Winner Winner x 1
  2. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    5:28 PM
    1.11
    10.2
    All my servers though uses this formula Eva.
     
    • Informative Informative x 2
  3. eva2000

    eva2000 Administrator Staff Member

    30,196
    6,789
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,144
    Local Time:
    7:28 PM
    Nginx 1.13.x
    MariaDB 5.5
    Thanks for sharing.. definitely needs more testing hence why it's disabled right now :)
     
    • Like Like x 2
  4. pamamolf

    pamamolf Well-Known Member

    2,726
    243
    63
    May 31, 2014
    Ratings:
    +434
    Local Time:
    12:28 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    I use also dynamic on my servers and a bit higher values than that formula :)

    @Revenge

    may have some nice formula for this as he did also some Dddos tests and maybe knows the limits better ?
     
    Last edited: Oct 8, 2017
  5. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    5:28 PM
    1.11
    10.2
    If you have a powerful CPU, like having 4ghz clock speed.
    And database server outside localhost.
    It's safe to increase it to:
     
  6. pamamolf

    pamamolf Well-Known Member

    2,726
    243
    63
    May 31, 2014
    Ratings:
    +434
    Local Time:
    12:28 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    My formula looks like:

    Code:
    pm = dynamic
    pm.max_children = cpu x 5
    pm.start_servers = cpu x 2
    pm.min_spare_servers = cpu x 1
    pm.max_spare_servers = cpu x 5
     
  7. pamamolf

    pamamolf Well-Known Member

    2,726
    243
    63
    May 31, 2014
    Ratings:
    +434
    Local Time:
    12:28 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Also i would like to confirm that if we set PHP_TUNING='y' it will be triggered at:

    1)Php upgrade
    2)Php downgrade
    3)Php upgrade or downgrade and ask YES to overwrite existing phpfpm config
    4)Php upgrade or downgrade and ask NO to overwrite existing phpfpm config

    ?
     
  8. eva2000

    eva2000 Administrator Staff Member

    30,196
    6,789
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,144
    Local Time:
    7:28 PM
    Nginx 1.13.x
    MariaDB 5.5
    yes if you set PHP_TUNING='y' in persistent config /etc/centminmod/custom_config.inc and recompile php via centmin.sh menu option 5 it should in theory apply to your default php-fpm.conf. It wouldn't apply to any other additional php-fpm pool config files you may have copied or manually made though.

    It doesn't touch pm ondemand default though, you need to manually set that to dynamic if you want such setting.
     
    • Informative Informative x 1