Learn about Centmin Mod LEMP Stack today
Register Now

Beta Branch update MARCH_TARGETNATIVE check for cloud vps providers in 123.09beta01

Discussion in 'Centmin Mod Github Commits' started by eva2000, Dec 2, 2018.

  1. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    2:28 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    update MARCH_TARGETNATIVE check for cloud vps providers in 123.09beta01

    - Disable march=native compiler option when certain VPS providers are detected. This is for smarter detection of cloud vps providers who run a mix of different cpu models to prevent issues when you switch host nodes via snapshot backup restores or whole vps migrations due to differing cpu models causing seg faults for nginx and php-fpm and can only be fixed after you recompile nginx and php-fpm after the move. This update fixes the issues so you don't need to recompile nginx and php-fpm after the move as not all Centmin Mod users would be aware of the solution for the seg faults caused by nginx and php-fpm being compiled on one cpu model having issues after a move to another vps host node which has a different cpu model.
    - Can disable override this smarter detection routine to force march=native compiler for nginx and php-fpm if you want more performance and are aware of the need to recompile nginx and php-fpm after vps host node moves. You can force march=native and disable override this smarter update by setting in persistent config file /etc/centminmod/custom_config.inc the following variable, MARCH_TARGETNATIVE_ALWAYS='y' prior to nginx and php-fpm recompiles or prior to initial centmin mod installs.

    Continue reading...

    123.09beta01 branch


     
  2. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    2:28 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Tested this on Upcloud with Intel Xeon Gold 6148 cpus as Upcloud is one of those VPS hosts detected by Centmin Mod that disables march=native if Upcloud, Linode, DigitaOcean, Vultr are detected. With MARCH_TARGETNATIVE_ALWAYS='y' set to force march=native for Nginx compiles with GCC 8.3.1 on CentOS 7 and seems like for Centmin Mod Nginx HTTPS performance improves around 25% while non-HTTPS doesn't improve at all. With MARCH_TARGETNATIVE_ALWAYS='y' set on these VPS providers, you have to recompile Nginx and PHP-FPM and Memcached via centmin.sh menu options 4, 5 and 10 respectively if you move your VPS onto a different VPS host node which has different cpu models though.
     
  3. BamaStangGuy

    BamaStangGuy Active Member

    669
    192
    43
    May 25, 2014
    Ratings:
    +272
    Local Time:
    11:28 AM
    So if using Upcloud we should have MARCH_TARGETNATIVE_ALWAYS='y'?
     
  4. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    2:28 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    You don't want to set MARCH_TARGETNATIVE_ALWAYS='y' on DigitalOcean, Vulr or Upcloud unless you are fully aware if your VPS moves to a different server or cpu within these VPS providers, you have to recompile nginx, php and memcached after the move if you have set MARCH_TARGETNATIVE_ALWAYS='y' yourself.
     
  5. rdan

    rdan Well-Known Member

    5,452
    1,418
    113
    May 25, 2014
    Ratings:
    +2,212
    Local Time:
    12:28 AM
    Mainline
    10.2
    So for more performance specially on Dedicated server, I can set?
    Thanks!
     
  6. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    2:28 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    1st one is default set to yes already on dedicated server and 2nd variable isn't needed for dedicated servers only for vps on linode/digitalocean/upcloud/vultr