Welcome to Centmin Mod Community
Register Now

Beta Branch add NGINX_DEVTOOLSETGCC for devtoolset-3 GCC 4.9 CentOS 7 nginx in 12…

Discussion in 'Centmin Mod Github Commits' started by eva2000, Oct 5, 2016.

  1. eva2000

    eva2000 Administrator Staff Member

    29,733
    6,713
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,023
    Local Time:
    5:36 PM
    Nginx 1.13.x
    MariaDB 5.5
    add NGINX_DEVTOOLSETGCC for devtoolset-3 GCC 4.9 CentOS 7 nginx in 123.09beta01

    CentOS 7 uses GCC 4.8.5 version which satisfies ngx_pagespeed 1.10+ and ngx_brotli mininum GCC requires of 4.8+. CentOS 6 uses GCC 4.4.7 and requires devtoolset-3 package's GCC 4.9. This update adds a new option to control devtoolset-3 GCC 4.9 usage on CentOS 7 via NGINX_DEVTOOLSETGCC='n' which is disabled by default. Nginx is compiled with GCC 4.9 instead of system GCC 4.8.5 on CentOS 7 when enabled via setting NGINX_DEVTOOLSETGCC='y' in persistent config file /etc/centminmod/custom_config.inc and then recompile nginx via centmin.sh menu option 4. This opens up the doors for future devtoolset-4 support for GCC 5.3 and so forth on CentOS systems.

    Centmin Mod Nginx can be compiled with either GCC or Clang compilers and defaults to using Clang via CLANG='y' option in centmin.sh. You can override this and switch from default Clang to GCC compilers for Nginx via CLANG='n' variable set in persistent config file /etc/centminmod/custom_config.inc and then recompile nginx via centmin.sh menu option 4.

    So basically for CentOS 7 to use GCC 4.9 via devtoolset-3, set in persistent config file /etc/centminmod/custom_config.inc the following variables:
    Code (Text):
    NGINX_DEVTOOLSETGCC='y'
    CLANG='n'
    

    then recompile nginx via centmin.sh menu option 4

    Running command below will tell you what Nginx is compiled and built with
    Code (Text):
    nginx -V
    


    Continue reading...

    123.09beta01 branch
     
  2. eva2000

    eva2000 Administrator Staff Member

    29,733
    6,713
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,023
    Local Time:
    5:36 PM
    Nginx 1.13.x
    MariaDB 5.5
    centmin.sh menu option 4 recompile on CentOS 7 to use GCC 4.9 via devtoolset-3, set in persistent config file /etc/centminmod/custom_config.inc the following variables:
    Code (Text):
    NGINX_DEVTOOLSETGCC='y'
    CLANG='n'
    

    CentOS 7 -march=native and gcc 4.9.2
     
  3. RoldanLT

    RoldanLT Well-Known Member

    3,882
    947
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,291
    Local Time:
    3:36 PM
    1.11
    10.2
    What is the advantage of this? :)
     
  4. eva2000

    eva2000 Administrator Staff Member

    29,733
    6,713
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,023
    Local Time:
    5:36 PM
    Nginx 1.13.x
    MariaDB 5.5
    mainly right now mainly that nginx compilation/installs/upgrade are also more optimised specifically for intel processors - particularly better optimised for newer Haswell and higher processors.
     
    • Like Like x 1
    • Informative Informative x 1
  5. Sunka

    Sunka Active Member

    910
    238
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +385
    Local Time:
    9:36 AM
    Nginx 1.13.3
    MariaDB 10.1.24
    I have clang 3.4.2

    Code:
    # nginx -V
    nginx version: nginx/1.11.5
    built by clang 3.4.2 (tags/RELEASE_34/dot2-final)
    built with LibreSSL 2.4.3
    TLS SNI support enabled
    How to find is that what I am using on server?
    Will it be better to switch to gcc than?
     
  6. eva2000

    eva2000 Administrator Staff Member

    29,733
    6,713
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,023
    Local Time:
    5:36 PM
    Nginx 1.13.x
    MariaDB 5.5
    find cpu used on server
    Code (Text):
    cat /proc/cpuinfo

    if you set CLANG='n' to use GCC, centmin mod will auto detect intel processor or not and run accordingly
     
  7. Sunka

    Sunka Active Member

    910
    238
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +385
    Local Time:
    9:36 AM
    Nginx 1.13.3
    MariaDB 10.1.24
    Code:
    cat /proc/cpuinfo
    processor       : 0
    vendor_id       : GenuineIntel
    cpu family      : 6
    model           : 63
    model name      : Intel(R) Xeon(R) CPU E5-2650L v3 @ 1.80GHz
     
  8. Sunka

    Sunka Active Member

    910
    238
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +385
    Local Time:
    9:36 AM
    Nginx 1.13.3
    MariaDB 10.1.24
    model name : Intel(R) Xeon(R) CPU E5-2650L v3 @ 1.80GHz
     
  9. eva2000

    eva2000 Administrator Staff Member

    29,733
    6,713
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,023
    Local Time:
    5:36 PM
    Nginx 1.13.x
    MariaDB 5.5
    yeah Intel though centmin mod automatically detects and uses appropriate GCC options when CLANG='n' is set in persistent config file
     
  10. Sunka

    Sunka Active Member

    910
    238
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +385
    Local Time:
    9:36 AM
    Nginx 1.13.3
    MariaDB 10.1.24
    So just add both:
    Code:
    NGINX_DEVTOOLSETGCC='y'
    CLANG='n'
    And recompile nginx again.

    Should be better than to use gcc instead clang for my server?
     
  11. eva2000

    eva2000 Administrator Staff Member

    29,733
    6,713
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,023
    Local Time:
    5:36 PM
    Nginx 1.13.x
    MariaDB 5.5
    yup
    • GCC results in software compiled/installed that performs faster but takes longer to compile - ALOT longer !
    • Clang results in faster compiling but not necessarily faster software
     
    • Like Like x 1
  12. Sunka

    Sunka Active Member

    910
    238
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +385
    Local Time:
    9:36 AM
    Nginx 1.13.3
    MariaDB 10.1.24
    OK
    Going to add this two rows and recompile nginx
     
  13. Sunka

    Sunka Active Member

    910
    238
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +385
    Local Time:
    9:36 AM
    Nginx 1.13.3
    MariaDB 10.1.24
    Total Nginx Upgrade Time: 626.860360963 seconds

    I think that is it.
    Seems all OK
     
    • Like Like x 1
  14. eva2000

    eva2000 Administrator Staff Member

    29,733
    6,713
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,023
    Local Time:
    5:36 PM
    Nginx 1.13.x
    MariaDB 5.5
    looks good :)
     
    • Like Like x 1