Get the most out of your Centmin Mod LEMP stack
Become a Member

Beta Branch add MARCH_TARGETNATIVE option for 123.09beta01 and higher

Discussion in 'Centmin Mod Github Commits' started by eva2000, Sep 9, 2017.

  1. eva2000

    eva2000 Administrator Staff Member

    50,852
    11,782
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,234
    Local Time:
    5:13 AM
    Nginx 1.25.x
    MariaDB 10.x
    add MARCH_TARGETNATIVE option for 123.09beta01 and higher

    - 123.09beta01 and higher can enable intel cpu specific compilation options for nginx and php-fpm for 64bit systems which can improve nginx and php-fpm performance. However, setting march=native will only compile nginx and php-fpm for specific cpu model of the server. This is fine for 99% of folks. However, some cloud VPS hosting providers allow users to migrate VPSes from one VPS host node to another i.e. Linode. The problem is the migrated VPS host node might use a different cpu model/architecture from the old VPS host node causing issues for Nginx and PHP-FPM until you recompile Nginx and PHP-FPM on the new server via centmin.sh menu option 4 and 5 which fixes the issue. Example issue https://community.centminmod.com/th...tart-after-i-migrate-linode-host-nodes.12724/
    - this update adds a new centmin.sh option MARCH_TARGETNATIVE='y' set by default to the existing march=native. However, you can set it to MARCH_TARGETNATIVE='n' via persistent config file /etc/centminmod/custom_config.inc which would change march=native to use march=x86-64 for 64bit systems and then recompile Nginx and PHP-FPM via centmin.sh menu option 4 and 5. This will allow you to not tie Nginx and PHP-FPM to specific cpu model/architecture. So you can do this prior to migrating your VPS to a new VPS host node to preserve uptime. Then once on new VPS host node, you can set back to MARCH_TARGETNATIVE='y' and recompile Nginx and PHP-FPM again for better performance.


    Continue reading...

    123.09beta01 branch
     
  2. eva2000

    eva2000 Administrator Staff Member

    50,852
    11,782
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,234
    Local Time:
    5:13 AM
    Nginx 1.25.x
    MariaDB 10.x
    when set to MARCH_TARGETNATIVE='n' via persistent config file /etc/centminmod/custom_config.inc