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

Beta Branch Testing GCC 8, GCC 9 & Clang 5/6/7 compiler for Centmin Mod Nginx & PHP-FPM

Discussion in 'Beta release code' started by eva2000, Jan 14, 2018.

Thread Status:
Not open for further replies.
  1. eva2000

    eva2000 Administrator Staff Member

    53,088
    12,107
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,640
    Local Time:
    7:31 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Like GCC 7 and Clang 4/5 testing previously, I am also starting to test optional support for using GCC 8 compiler for compiling Nginx and PHP-FPM with eventually. Currently, there's no YUM packages for GCC 8 as it's still in development. But I am testing GCC 8 snapshot releases. Updated: Clang 5.0.1 and Clang 6.0.0 coming along nicely too.

    Example of Binutils 2.29.1 and GCC 8 snapshot installed
    Code (Text):
    *************************************************
    * Setup /opt/gcc-8-20180107/enable
    *************************************************
    
    *************************************************
    * Setup /opt/gcc-8-20180107/enable completed
    *************************************************
    
    /opt/gcc-8-20180107/bin/ld -v
    GNU ld (GNU Binutils) 2.29.1
    
    /opt/gcc-8-20180107/bin/ld.gold -v
    GNU gold (GNU Binutils 2.29.1) 1.14
    
    /opt/gcc-8-20180107/bin/ld.bfd -v
    GNU ld (GNU Binutils) 2.29.1
    
    /opt/gcc-8-20180107/bin/gcc --version
    gcc (GCC) 8.0.0 20180107 (experimental)
    Copyright (C) 2018 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    /opt/gcc-8-20180107/bin/g++ --version
    g++ (GCC) 8.0.0 20180107 (experimental)
    Copyright (C) 2018 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    *************************************************
    * Compile GCC Completed
    *************************************************
    

    symlink to make it easier to detect for Nginx and PHP-FPM compiles
    Code (Text):
    ls -lah /opt/gcc8
    lrwxrwxrwx 1 root root 19 Jan 14 02:22 /opt/gcc8 -> /opt/gcc-8-20180107
    

    Code (Text):
    /opt/gcc8/bin/gcc -v
    Using built-in specs.
    COLLECT_GCC=/opt/gcc8/bin/gcc
    COLLECT_LTO_WRAPPER=/opt/gcc-8-20180107/libexec/gcc/x86_64-redhat-linux/8.0.0/lto-wrapper
    Target: x86_64-redhat-linux
    Configured with: ../configure --prefix=/opt/gcc-8-20180107 --disable-multilib --disable-nls --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++ --enable-initfini-array --disable-libgcj --enable-gnu-indirect-function --with-tune=generic --build=x86_64-redhat-linux
    Thread model: posix
    gcc version 8.0.0 20180107 (experimental) (GCC)
    

    Though right now Nginx fails to compile with GCC 8 installed - so some ways to go before we will see it working. So more private testing :)
    Code (Text):
    ./configure --with-ld-opt="-lrt -ljemalloc -Wl,-z,relro -Wl,-rpath,/usr/local/lib" --with-cc-opt="-m64 -march=native -g -O3 -fstack-protector-strong -flto -fuse-ld=gold --param=ssp-buffer-size=4 -Wformat -Werror=format-security  -Wp,-D_FORTIFY_SOURCE=2 -gsplit-dwarf" --sbin-path=/usr/local/sbin/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --with-compat --with-http_stub_status_module --with-http_secure_link_module --with-libatomic --with-http_gzip_static_module --with-http_sub_module --with-http_addition_module --with-http_image_filter_module=dynamic --with-http_geoip_module --with-stream_geoip_module --with-stream_realip_module --with-stream_ssl_preread_module --with-threads --with-stream=dynamic --with-stream_ssl_module --with-http_realip_module --add-dynamic-module=../ngx-fancyindex-0.4.2 --add-module=../ngx_cache_purge-2.4.2 --add-module=../ngx_devel_kit-0.3.0 --add-dynamic-module=../set-misc-nginx-module-0.31 --add-dynamic-module=../echo-nginx-module-0.61 --add-module=../redis2-nginx-module-0.14 --add-module=../ngx_http_redis-0.3.7 --add-module=../memc-nginx-module-0.18 --add-module=../srcache-nginx-module-0.31 --add-dynamic-module=../headers-more-nginx-module-0.33 --with-pcre=../pcre-8.41 --with-pcre-jit --with-zlib=../zlib-1.2.11 --with-http_ssl_module --with-http_v2_module --with-openssl=../libressl-2.6.4
    checking for OS
     + Linux 2.6.32-042stab120.19 x86_64
    checking for C compiler ... found
     + using GNU C compiler
     + gcc version: 8.0.0 20180107 (experimental) (GCC)
    checking for gcc -pipe switch ... found
    checking for --with-ld-opt="-lrt -ljemalloc -Wl,-z,relro -Wl,-rpath,/usr/local/lib" ... not found
    ./configure: error: the invalid value in --with-ld-opt="-lrt -ljemalloc -Wl,-z,relro -Wl,-rpath,/usr/local/lib"
    

    nginx error log
    Code (Text):
    cat /svr-setup/nginx-1.13.8/objs/autoconf.err
    
    ----------------------------------------
    checking for C compiler
    
    ----------------------------------------
    checking for gcc -pipe switch
    
    ----------------------------------------
    checking for --with-ld-opt="-lrt -ljemalloc -Wl,-z,relro -Wl,-rpath,/usr/local/lib"
    
    objs/autotest.c:9:1: internal compiler error: Segmentation fault
     }
     ^
    0xb0eadf crash_signal
            ../../gcc/toplev.c:325
    0x873f6b hash_table<indirect_string_hasher, xcallocator>::elements() const
            ../../gcc/hash-table.h:388
    0x873f6b void hash_table<indirect_string_hasher, xcallocator>::traverse<dwarf_form, &(output_indirect_string(indirect_string_node**, dwarf_form))>(dwarf_form)
            ../../gcc/hash-table.h:987
    0x841748 output_indirect_strings
            ../../gcc/dwarf2out.c:27799
    0x8725d2 dwarf2out_early_finish
            ../../gcc/dwarf2out.c:30894
    0x7f4fe8 symbol_table::finalize_compilation_unit()
            ../../gcc/cgraphunit.c:2713
    Please submit a full bug report,
    with preprocessed source if appropriate.
    Please include the complete backtrace with any bug report.
    See <https://gcc.gnu.org/bugs/> for instructions.
    ----------
    #include <sys/types.h>
    
    int main(void) {
        ;
        return 0;
    }
    
    ----------
    ccache gcc -m64 -march=native -g -O3 -fstack-protector-strong -flto -fuse-ld=gold --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -gsplit-dwarf -o objs/autotest objs/autotest.c -lrt -ljemalloc -Wl,-z,relro -Wl,-rpath,/usr/local/lib
    ----------
    

    no problems with GCC 7.2.1 though


     
  2. eva2000

    eva2000 Administrator Staff Member

    53,088
    12,107
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,640
    Local Time:
    7:31 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Looks like Nginx doesn't like to be compiled with GCC 8 when -gsplit-dwarf parameter was set. Could be a GCC 8 regression bug since it's stilll in development. That got me past the internal compiler error segmentation fault above. But ran into more errors hanging up on -Werror=cast-function-type related warnings so need to add another compile flag to Nginx compile routines when GCC 8 is used for -Wno-cast-function-type
    Code (Text):
    ccache gcc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -m64 -march=x86-64 -g -O3 -fstack-protector-strong -flto -fuse-ld=gold --param=ssp-buffer-size=4 -Wformat -Werror=format-security  -Wp,-D_FORTIFY_SOURCE=2 -DNDK_SET_VAR -DNDK_UPSTREAM_LIST -I src/core -I src/event -I src/event/modules -I src/os/unix -I ../ngx_devel_kit-0.3.0/objs -I objs/addon/ndk -I ../pcre-8.41 -I ../libressl-2.6.4/.openssl/include -I ../zlib-1.2.11 -I objs -I src/http -I src/http/modules -I src/http/v2 -I ../ngx_devel_kit-0.3.0/src -I ../ngx_devel_kit-0.3.0/src -I ../ngx_devel_kit-0.3.0/objs -I objs/addon/ndk \
            -o objs/src/http/ngx_http_upstream.o \
            src/http/ngx_http_upstream.c
    src/http/ngx_http_script.c: In function 'ngx_http_script_add_copy_code':
    src/http/ngx_http_script.c:698:18: error: cast between incompatible function types from 'size_t (*)(ngx_http_script_engine_t *)' {aka 'long unsigned int (*)(struct <anonymous> *)'} to 'void (*)(ngx_http_script_engine_t *)' {aka 'void (*)(struct <anonymous> *)'} [-Werror=cast-function-type]
         code->code = (ngx_http_script_code_pt) ngx_http_script_copy_len_code;
                      ^
    src/http/ngx_http_script.c: In function 'ngx_http_script_add_var_code':
    src/http/ngx_http_script.c:787:18: error: cast between incompatible function types from 'size_t (*)(ngx_http_script_engine_t *)' {aka 'long unsigned int (*)(struct <anonymous> *)'} to 'void (*)(ngx_http_script_engine_t *)' {aka 'void (*)(struct <anonymous> *)'} [-Werror=cast-function-type]
         code->code = (ngx_http_script_code_pt) ngx_http_script_copy_var_len_code;
                      ^
    src/http/ngx_http_script.c: In function 'ngx_http_script_add_capture_code':
    src/http/ngx_http_script.c:1181:18: error: cast between incompatible function types from 'size_t (*)(ngx_http_script_engine_t *)' {aka 'long unsigned int (*)(struct <anonymous> *)'} to 'void (*)(ngx_http_script_engine_t *)' {aka 'void (*)(struct <anonymous> *)'} [-Werror=cast-function-type]
         code->code = (ngx_http_script_code_pt)
                      ^
    src/http/ngx_http_script.c: In function 'ngx_http_script_add_full_name_code':
    src/http/ngx_http_script.c:1296:18: error: cast between incompatible function types from 'size_t (*)(ngx_http_script_engine_t *)' {aka 'long unsigned int (*)(struct <anonymous> *)'} to 'void (*)(ngx_http_script_engine_t *)' {aka 'void (*)(struct <anonymous> *)'} [-Werror=cast-function-type]
         code->code = (ngx_http_script_code_pt) ngx_http_script_full_name_len_code;
                      ^
    cc1: all warnings being treated as errors
    make[1]: *** [objs/src/http/ngx_http_script.o] Error 1
    make[1]: *** Waiting for unfinished jobs....
    make[1]: Leaving directory `/svr-setup/nginx-1.13.8'
    make: *** [build] Error 2
    

    Looking much better with workaround for GCC 8 compiled Nginx. First successful Nginx + GCC 8 compilation :D

    with LibreSSL 2.6.4
    with OpenSSL 1.1.0g and setting variable LIBRESSL_SWITCH='n' in persistent config file /etc/centminmod/custom_config.inc prior to Nginx compile via centmin.sh menu option 4
     
  3. eva2000

    eva2000 Administrator Staff Member

    53,088
    12,107
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,640
    Local Time:
    7:31 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+

    Guide To GCC & Clang Compiler Selection For Nginx Installs



    Centmin Mod 123.09beta01 LEMP stack can allow users to optionally select their own choice of compilers for Nginx and PHP-FPM. Below is example for Nginx where you can choose between native CentOS GCC version, GCC 5.3.1, GCC 6.3.1, GCC 7.2.1, Clang 3.4.2, Clang 4.0.1 and soon GCC 8.0 and Clang 5.0. As discussed here, depending on pairing of compiler and specific cpu model, you can get better Nginx or PHP-FPM performance usually between 5-10%. Which may offset some of the performance loss due to Linux Kernel Page Table Isolation updates to fix Meltdown/Spectre vulnerabilities :)

    Blow is a list of persisent config file /etc/centminmod/custom_config.inc variables controlling which compiler and version is used for GCC or Clang compilers with Nginx + switching from default LibreSSL 2.6.4 to OpenSSL 1.1.0g. You set these variables BEFORE you run centmin.sh menu option 4 to recompile your Nginx versions.

    You can check nginx -V output's built by line for details.

    For GCC 8.0 - note experimental and not enabled in public Centmin Mod 123.09beta01 code yet and undergoing private testing right now.
    Code (Text):
    LIBRESSL_SWITCH='n'
    CLANG='n'
    DEVTOOLSETSIX='n'
    DEVTOOLSETSEVEN='n'
    DEVTOOLSETEIGHT='y'
    NGINX_DEVTOOLSETGCC='y'
    

    For GCC 7.2.1
    Code (Text):
    LIBRESSL_SWITCH='n'
    CLANG='n'
    DEVTOOLSETSIX='n'
    DEVTOOLSETSEVEN='y'
    DEVTOOLSETEIGHT='n'
    NGINX_DEVTOOLSETGCC='y'
    

    For GCC 6.3.1
    Code (Text):
    LIBRESSL_SWITCH='n'
    CLANG='n'
    DEVTOOLSETSIX='y'
    DEVTOOLSETSEVEN='n'
    DEVTOOLSETEIGHT='n'
    NGINX_DEVTOOLSETGCC='y'
    

    For GCC 5.3.1
    Code (Text):
    LIBRESSL_SWITCH='n'
    CLANG='n'
    DEVTOOLSETSIX='n'
    DEVTOOLSETSEVEN='n'
    DEVTOOLSETEIGHT='n'
    NGINX_DEVTOOLSETGCC='y'
    

    For GCC 4.8.5 native CentOS 7.4 OS provided
    Code (Text):
    LIBRESSL_SWITCH='n'
    CLANG='n'
    DEVTOOLSETSIX='n'
    DEVTOOLSETSEVEN='n'
    DEVTOOLSETEIGHT='n'
    NGINX_DEVTOOLSETGCC='n'
    

    For Clang 3.4.2
    Code (Text):
    LIBRESSL_SWITCH='n'
    CLANG='y'
    DEVTOOLSETSIX='n'
    DEVTOOLSETSEVEN='n'
    DEVTOOLSETEIGHT='n'
    NGINX_DEVTOOLSETGCC='n'
    

    For Clang 4.0.1 add CLANG_FOUR='y'
    Code (Text):
    LIBRESSL_SWITCH='n'
    CLANG_FOUR='y'
    CLANG='y'
    DEVTOOLSETSIX='n'
    DEVTOOLSETSEVEN='n'
    DEVTOOLSETEIGHT='n'
    NGINX_DEVTOOLSETGCC='y'
    

    For Clang 5.0.1 add CLANG_FIVE='y'
    Code (Text):
    LIBRESSL_SWITCH='n'
    CLANG_FIVE='y'
    CLANG='y'
    DEVTOOLSETSIX='n'
    DEVTOOLSETSEVEN='n'
    DEVTOOLSETEIGHT='n'
    NGINX_DEVTOOLSETGCC='y'
    

     
  4. eva2000

    eva2000 Administrator Staff Member

    53,088
    12,107
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,640
    Local Time:
    7:31 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Doing some quick Siege static web serving benchmarks on 2 cpu thread OpenVZ VPS server which sports an Intel E5-1650v3 @3.50Ghz processor running Centmin Mod 123.09beta01 on CentOS 7.4 64bit.

    Siege test paramaters and changing comment marker for each respective GCC version tested
    Code (Text):
    comment='gcc8'
    siege -b -d1s -c100 -r500 -m $comment http://localhost | tee "siege-${comment}-$(date +"%d%m%y-%H%M%S").log"
    

    Results running each Nginx + GCC pairing through 3x runs of Siege benchmarking and average of 3 runs shown.

    Notes:
    • These are just quick tests as the results aren't entirely accurate as you probably need to do more than 3x runs and being on OpenVZ virtualized server means you're subject to noisy neighbours and resource contention still.
    • Do not take these results as gospel as performance depends on your compiler + cpu model pairing. You may have a different cpu model and that may perform differently to below results. Finding the right compiler + cpu pairing is part of the fun :D

    siege-chart-gcc8-nginx-140118-01.png
     
  5. eva2000

    eva2000 Administrator Staff Member

    53,088
    12,107
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,640
    Local Time:
    7:31 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    New January 14th, 2018 snapshot of GCC 8 has been released so started building that for testing including building a custom RPM. Moved build testing to my OVH MC-32 i7 4790K 4C/8T dedicated server for faster compile times.

    Just the GCC 8 build task ~1534 seconds - it was this fast as Centmin Mod uses compiler caching via ccache, so subsequent recompiles are faster.

    Code (Text):
    *************************************************
    Setup /opt/gcc-8-20180114/enable
    *************************************************
    
    *************************************************
    Setup /opt/gcc-8-20180114/enable completed
    *************************************************
    
    /opt/gcc-8-20180114/bin/ld -v
    GNU ld (GNU Binutils) 2.29.1
    
    /opt/gcc-8-20180114/bin/ld.gold -v
    GNU gold (GNU Binutils 2.29.1) 1.14
    
    /opt/gcc-8-20180114/bin/ld.bfd -v
    GNU ld (GNU Binutils) 2.29.1
    
    /opt/gcc-8-20180114/bin/gcc --version
    gcc (GCC) 8.0.0 20180114 (experimental)
    Copyright (C) 2018 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    
    /opt/gcc-8-20180114/bin/g++ --version
    g++ (GCC) 8.0.0 20180114 (experimental)
    Copyright (C) 2018 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    
    RPMs Built
    
    /svr-setup/gcc-8-20180114/test/gcc-all-8.0-1.x86_64.rpm
    
    *************************************************
    Compile GCC Completed
    log: /root/centminlogs/tools-gcc-install_160118-181920.log
    *************************************************
    
    Total GCC Install Time: 1534.884407254 seconds
    

    Code (Text):
    /opt/gcc8/bin/gcc -v
    Using built-in specs.
    COLLECT_GCC=/opt/gcc8/bin/gcc
    COLLECT_LTO_WRAPPER=/opt/gcc-8-20180114/libexec/gcc/x86_64-redhat-linux/8.0.0/lto-wrapper
    Target: x86_64-redhat-linux
    Configured with: ../configure --prefix=/opt/gcc-8-20180114 --disable-multilib --enable-shared --disable-nls --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-install-libiberty --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++ --enable-initfini-array --disable-libgcj --enable-gnu-indirect-function --with-tune=generic --build=x86_64-redhat-linux --enable-lto --enable-gold
    Thread model: posix
    gcc version 8.0.0 20180114 (experimental) (GCC)
    

    ccache compiler caching stats - had to bump up cache allocation from default 2GB to 8GB
    Code (Text):
    ccache -s
    cache directory                     /home/.ccache
    primary config                      /home/.ccache/ccache.conf
    secondary config      (readonly)    /usr/local/etc/ccache.conf
    cache hit (direct)                418866
    cache hit (preprocessed)           71518
    cache miss                        199055
    cache hit rate                     71.13 %
    called for link                    60404
    called for preprocessing           24744
    multiple source files                 16
    compiler produced empty output         3
    compile failed                      7202
    ccache internal error               3932
    preprocessor error                  4233
    bad compiler arguments              7022
    unsupported source language           30
    autoconf compile/link              70493
    unsupported compiler option          428
    unsupported code directive             6
    no input file                      17476
    cleanups performed                   238
    files in cache                    168818
    cache size                           2.4 GB
    max cache size                       8.0 GB
    


    Resulting Centmin Mod Nginx compiled with GCC 8 Jan 14, 2018 snapshot

    GCC Retpoline Patches For Spectre Variant 2



    The Jan 14th, 2018 GCC 8 snapshot adds the new GCC Retpoline patches to address Spectre variant 2 vulnerabilities. I confirmed they exist in my custom build GCC 8 RPM binary installations.

    For Intel i7 4790K native supported options now show the 3 new options for -mindirect-branch, -mindirect-return and -mindirect-branch-register
    Code (Text):
    /opt/gcc8/bin/gcc -c -Q -march=native --help=target
    The following options are target specific:
      -m128bit-long-double                  [enabled]
      -m16                                  [disabled]
      -m32                                  [disabled]
      -m3dnow                               [disabled]
      -m3dnowa                              [disabled]
      -m64                                  [enabled]
      -m80387                               [enabled]
      -m8bit-idiv                           [disabled]
      -m96bit-long-double                   [disabled]
      -mabi=                                sysv
      -mabm                                 [enabled]
      -maccumulate-outgoing-args            [disabled]
      -maddress-mode=                       long
      -madx                                 [disabled]
      -maes                                 [enabled]
      -malign-data=                         compat
      -malign-double                        [disabled]
      -malign-functions=                    0
      -malign-jumps=                        0
      -malign-loops=                        0
      -malign-stringops                     [enabled]
      -mandroid                             [disabled]
      -march=                               haswell
      -masm=                                att
      -mavx                                 [enabled]
      -mavx2                                [enabled]
      -mavx256-split-unaligned-load         [disabled]
      -mavx256-split-unaligned-store        [disabled]
      -mavx5124fmaps                        [disabled]
      -mavx5124vnniw                        [disabled]
      -mavx512bitalg                        [disabled]
      -mavx512bw                            [disabled]
      -mavx512cd                            [disabled]
      -mavx512dq                            [disabled]
      -mavx512er                            [disabled]
      -mavx512f                             [disabled]
      -mavx512ifma                          [disabled]
      -mavx512pf                            [disabled]
      -mavx512vbmi                          [disabled]
      -mavx512vbmi2                         [disabled]
      -mavx512vl                            [disabled]
      -mavx512vnni                          [disabled]
      -mavx512vpopcntdq                     [disabled]
      -mbionic                              [disabled]
      -mbmi                                 [enabled]
      -mbmi2                                [enabled]
      -mbranch-cost=<0,5>                   3
      -mcall-ms2sysv-xlogues                [disabled]
      -mcet                                 [disabled]
      -mcet-switch                          [disabled]
      -mcld                                 [disabled]
      -mclflushopt                          [disabled]
      -mclwb                                [disabled]
      -mclzero                              [disabled]
      -mcmodel=                             [default]
      -mcpu=                         
      -mcrc32                               [disabled]
      -mcx16                                [enabled]
      -mdispatch-scheduler                  [disabled]
      -mdump-tune-features                  [disabled]
      -mf16c                                [enabled]
      -mfancy-math-387                      [enabled]
      -mfentry                              [disabled]
      -mfma                                 [enabled]
      -mfma4                                [disabled]
      -mforce-drap                          [disabled]
      -mforce-indirect-call                 [disabled]
      -mfp-ret-in-387                       [enabled]
      -mfpmath=                             sse
      -mfsgsbase                            [enabled]
      -mfunction-return=                    keep
      -mfused-madd                   
      -mfxsr                                [enabled]
      -mgeneral-regs-only                   [disabled]
      -mgfni                                [disabled]
      -mglibc                               [enabled]
      -mhard-float                          [enabled]
      -mhle                                 [enabled]
      -miamcu                               [disabled]
      -mibt                                 [disabled]
      -mieee-fp                             [enabled]
      -mincoming-stack-boundary=            0
      -mindirect-branch-register            [disabled]
      -mindirect-branch=                    keep
      -minline-all-stringops                [disabled]
      -minline-stringops-dynamically        [disabled]
      -mintel-syntax                 
      -mlarge-data-threshold=<number>       65536
      -mlong-double-128                     [disabled]
      -mlong-double-64                      [disabled]
      -mlong-double-80                      [enabled]
      -mlwp                                 [disabled]
      -mlzcnt                               [enabled]
      -mmemcpy-strategy=             
      -mmemset-strategy=             
      -mmitigate-rop                        [disabled]
      -mmmx                                 [enabled]
      -mmovbe                               [enabled]
      -mmpx                                 [disabled]
      -mms-bitfields                        [disabled]
      -mmusl                                [disabled]
      -mmwaitx                              [disabled]
      -mno-align-stringops                  [disabled]
      -mno-default                          [disabled]
      -mno-fancy-math-387                   [disabled]
      -mno-push-args                        [disabled]
      -mno-red-zone                         [disabled]
      -mno-sse4                             [disabled]
      -mnop-mcount                          [disabled]
      -momit-leaf-frame-pointer             [disabled]
      -mpc32                                [disabled]
      -mpc64                                [disabled]
      -mpc80                                [disabled]
      -mpclmul                              [enabled]
      -mpcommit                             [disabled]
      -mpku                                 [disabled]
      -mpopcnt                              [enabled]
      -mprefer-avx128                 
      -mprefer-vector-width=                none
      -mpreferred-stack-boundary=           0
      -mprefetchwt1                         [disabled]
      -mprfchw                              [disabled]
      -mpush-args                           [enabled]
      -mrdpid                               [disabled]
      -mrdrnd                               [enabled]
      -mrdseed                              [disabled]
      -mrecip                               [disabled]
      -mrecip=                       
      -mrecord-mcount                       [disabled]
      -mred-zone                            [enabled]
      -mregparm=                            6
      -mrtd                                 [disabled]
      -mrtm                                 [disabled]
      -msahf                                [enabled]
      -msgx                                 [disabled]
      -msha                                 [disabled]
      -mshstk                               [disabled]
      -mskip-rax-setup                      [disabled]
      -msoft-float                          [disabled]
      -msse                                 [enabled]
      -msse2                                [enabled]
      -msse2avx                             [disabled]
      -msse3                                [enabled]
      -msse4                                [enabled]
      -msse4.1                              [enabled]
      -msse4.2                              [enabled]
      -msse4a                               [disabled]
      -msse5                         
      -msseregparm                          [disabled]
      -mssse3                               [enabled]
      -mstack-arg-probe                     [disabled]
      -mstack-protector-guard-offset= 
      -mstack-protector-guard-reg=   
      -mstack-protector-guard-symbol= 
      -mstack-protector-guard=              tls
      -mstackrealign                        [disabled]
      -mstringop-strategy=                  [default]
      -mstv                                 [enabled]
      -mtbm                                 [disabled]
      -mtls-dialect=                        gnu
      -mtls-direct-seg-refs                 [enabled]
      -mtune-ctrl=                   
      -mtune=                               haswell
      -muclibc                              [disabled]
      -mvaes                                [disabled]
      -mveclibabi=                          [default]
      -mvect8-ret-in-mem                    [disabled]
      -mvpclmulqdq                          [disabled]
      -mvzeroupper                          [enabled]
      -mx32                                 [disabled]
      -mxop                                 [disabled]
      -mxsave                               [enabled]
      -mxsavec                              [disabled]
      -mxsaveopt                            [enabled]
      -mxsaves                              [disabled]
    
      Known assembler dialects (for use with the -masm= option):
        att intel
    
      Known ABIs (for use with the -mabi= option):
        ms sysv
    
      Known code models (for use with the -mcmodel= option):
        32 kernel large medium small
    
      Valid arguments to -mfpmath=:
        387 387+sse 387,sse both sse sse+387 sse,387
    
      Known indirect branch choices (for use with the -mindirect-branch=/-mfunction-return= options):
        keep thunk thunk-extern thunk-inline
    
      Known data alignment choices (for use with the -malign-data= option):
        abi cacheline compat
    
      Known vectorization library ABIs (for use with the -mveclibabi= option):
        acml svml
    
      Known address mode (for use with the -maddress-mode= option):
        long short
    
      Known preferred register vector length (to use with the -mprefer-vector-width= option)
        128 256 512 none
    
      Known stack protector guard (for use with the -mstack-protector-guard= option):
        global tls
    
      Valid arguments to -mstringop-strategy=:
        byte_loop libcall loop rep_4byte rep_8byte rep_byte unrolled_loop
        vector_loop
    
      Known TLS dialects (for use with the -mtls-dialect= option):
        gnu gnu2
    

    note the output for
    Code (Text):
    /opt/gcc8/bin/gcc -c -Q -march=native --help=target | egrep 'indirect|function-return'
      -mforce-indirect-call                    [disabled]
      -mfunction-return=                       keep
      -mindirect-branch-register               [disabled]
      -mindirect-branch=                       keep
      Known indirect branch choices (for use with the -mindirect-branch=/-mfunction-return= options):
    

    Code (Text):
      Known indirect branch choices (for use with the -mindirect-branch=/-mfunction-return= options):
        keep thunk thunk-extern thunk-inline
    


    From Benchmarking Linux With The Retpoline Patches For Spectre - Phoronix
    GCC 8 Patches Posted For Spectre Mitigation - Phoronix
    Benchmarks from Phoronix for GCC 8 new patches Benchmarking Retpoline-Enabled GCC 8 With -mindirect-branch=thunk - Phoronix

     
    Last edited: Jan 17, 2018
  6. eva2000

    eva2000 Administrator Staff Member

    53,088
    12,107
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,640
    Local Time:
    7:31 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+

    Test Building GCC 7.2.1 & GCC 8.0 RPMs



    Been busy perfecting my GCC 7/8 + Binutils compilation configurations and custom RPM builds specifically for CentOS 7 64bit OS for now. Just like PHP 7 which supports Profile Guided Optimizations (PGO) to boost PHP 7 performance, GCC can be built with PGO as well for better than stock build performance. GCC can also be built with Link Time Optimization (LTO).

    So I have scripted building both GCC 7 and GCC 8 with RPMs with PGO + LTO and RPMs without PGO + LTO. Building GCC with PGO + LTO increases compilation times by ~20-25% on Intel Core i7 4790K but result in better performing GCC binaries which in turn if used to build apps i.e. using resulting GCC binary to build Centmin Mod Nginx binary, can in theory result in better Nginx performance. Haven't benchmark tested the improvements yet but from what I have seen it's between ~7-10% improvement :)

    Build both GCC 7 & GCC 8 RPMs (both PGO + non-PGO) and accompanying Binutils RPMs all at once
    Code (Text):
    -rw-r--r--   1 root  root  5.2M Jan 20 13:24 binutils-gcc7-2.29.1-1.el7.x86_64.rpm
    -rw-r--r--   1 root  root  5.2M Jan 20 12:17 binutils-gcc8-2.29.1-1.el7.x86_64.rpm
    -rw-r--r--   1 root  root   33M Jan 20 16:41 gcc7-7.2.1-1.el7.x86_64.rpm
    -rw-r--r--   1 root  root   37M Jan 20 17:09 gcc7-pgo-7.2.1-1.el7.x86_64.rpm
    -rw-r--r--   1 root  root   36M Jan 20 16:09 gcc8-8.0-1.el7.x86_64.rpm
    -rw-r--r--   1 root  root   41M Jan 20 17:46 gcc8-pgo-8.0-1.el7.x86_64.rpm
    


    GCC 7
    Code (Text):
    /opt/gcc7/bin/gcc -v
    Using built-in specs.
    COLLECT_GCC=/opt/gcc7/bin/gcc
    COLLECT_LTO_WRAPPER=/opt/gcc-7-20180111/libexec/gcc/x86_64-redhat-linux/7/lto-wrapper
    Target: x86_64-redhat-linux
    Configured with: ../configure --prefix=/opt/gcc-7-20180111 --disable-multilib --enable-bootstrap --enable-plugin --with-gcc-major-version-only --enable-shared --disable-nls --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-install-libiberty --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++ --enable-initfini-array --disable-libgcj --enable-gnu-indirect-function --with-tune=generic --build=x86_64-redhat-linux --enable-lto --enable-gold
    Thread model: posix
    gcc version 7.2.1 20180111 (GCC)
    

    Code (Text):
    /opt/gcc7/bin/ld.gold -v
    GNU gold (GNU Binutils 2.29.1) 1.14
    


    GCC 8
    Code (Text):
    /opt/gcc8/bin/gcc -v 
    Using built-in specs.
    COLLECT_GCC=/opt/gcc8/bin/gcc
    COLLECT_LTO_WRAPPER=/opt/gcc-8-20180114/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
    Target: x86_64-redhat-linux
    Configured with: ../configure --prefix=/opt/gcc-8-20180114 --disable-multilib --enable-bootstrap --enable-plugin --with-gcc-major-version-only --enable-shared --disable-nls --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-install-libiberty --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++ --enable-initfini-array --disable-libgcj --enable-gnu-indirect-function --with-tune=generic --build=x86_64-redhat-linux --enable-lto --enable-gold
    Thread model: posix
    gcc version 8.0.0 20180114 (experimental) (GCC)
    

    Code (Text):
    /opt/gcc8/bin/ld.gold -v
    GNU gold (GNU Binutils 2.29.1) 1.14
    


    Compiling GCC is very time consuming though not as complicated and as time consuming as compiling for Clang 4/5 compilers. My OVH i7 4790K was kept quite busy from below stats :D

    nixstats-install-all.sh-190118-03.png
    nixstats-install-all.sh-190118-04.png
     
  7. eva2000

    eva2000 Administrator Staff Member

    53,088
    12,107
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,640
    Local Time:
    7:31 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Latest GCC 8.0.1 20180304 built RPMs with Profile Guided Optimizations + LTO + Gold Linker :)

    Code (Text):
    /opt/gcc-8-20180304/bin/gcc -v
    Using built-in specs.
    COLLECT_GCC=/opt/gcc-8-20180304/bin/gcc
    COLLECT_LTO_WRAPPER=/opt/gcc-8-20180304/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
    Target: x86_64-redhat-linux
    Configured with: ../configure --prefix=/opt/gcc-8-20180304 --disable-multilib --enable-bootstrap --enable-plugin --with-gcc-major-version-only --enable-shared --disable-nls --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-install-libiberty --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++ --enable-initfini-array --disable-libgcj --enable-gnu-indirect-function --with-tune=generic --build=x86_64-redhat-linux --enable-lto --enable-gold
    Thread model: posix
    gcc version 8.0.1 20180304 (experimental) (GCC)
    

    Code (Text):
    RPMs Built
    /svr-setup/binutils-gcc8-2.30-1.el7.x86_64.rpm
    /svr-setup/gcc8-pgo-8.0-1.el7.x86_64.rpm
    
    ls -lah /svr-setup | egrep 'gcc8-pgo-8.0|binutils-gcc8-2.30'
    -rw-r--r--    1 root      root       5.3M Mar  7 21:48 binutils-gcc8-2.30-1.el7.x86_64.rpm
    -rw-r--r--    1 root      root        38M Mar  7 22:27 gcc8-pgo-8.0-1.el7.x86_64.rpm
    
    Installed Packages
    Name        : binutils-gcc8
    Arch        : x86_64
    Version     : 2.30
    Release     : 1.el7
    Size        : 48 M
    Repo        : installed
    Summary     : binutils-gcc8 for centminmod.com LEMP stack installs
    URL         : https://centminmod.com
    License     : unknown
    Description : binutils-gcc8 for centminmod.com LEMP stacks
    
    
    * Wed Mar 07 2018 George Liu <centminmod.com> 2.30
    - Binutils 2.30 for centminmod.com LEMP stack installs
    

    Code (Text):
    Installed Packages
    Name        : gcc8-pgo
    Arch        : x86_64
    Version     : 8.0
    Release     : 1.el7
    Size        : 287 M
    Repo        : installed
    Summary     : gcc8-pgo for centminmod.com LEMP stack installs
    URL         : https://centminmod.com
    License     : unknown
    Description : gcc8-pgo for centminmod.com LEMP stacks
    
    
    * Wed Mar 07 2018 George Liu <centminmod.com> 8
    - GCC 8 for centminmod.com LEMP stack installs
    

    Test compile Nginx 1.13.9 with GCC 8.0.1 20180304 date snapshot + OpenSSL 1.1.1-pre2 beta for TLSv1.3 support
     
  8. eva2000

    eva2000 Administrator Staff Member

    53,088
    12,107
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,640
    Local Time:
    7:31 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Latest source compiled Clang 4.0.1, 5.0.1 and 6.0.0 compilers builds :)

    Clang 6.0.0 compiler built Centmin Mod Nginx 1.13.9 web server :D Unfortunately, some compatibility issues with Clang 6.0.0 and Cloudflare zlib forked library so have to switch back to standard zlib 1.2.11 library and Clang 6.0.0 throws up an error with OpenSSL 1.1.1-pre2 beta crypto library so using OpenSSL 1.1.0g stable
    Code (Text):
    /opt/sbin/llvm-release_60/bin/clang -v
    clang version 6.0.0 (branches/release_60 326962)
    Target: x86_64-unknown-linux-gnu
    Thread model: posix
    InstalledDir: /opt/sbin/llvm-release_60/bin
    Found candidate GCC installation: /opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.3.1
    Found candidate GCC installation: /opt/rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/6.3.1
    Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.2
    Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.5
    Selected GCC installation: /opt/rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/6.3.1
    Candidate multilib: .;@m64
    Candidate multilib: 32;@m32
    Selected multilib: .;@m64
    

    Code (Text):
    /opt/sbin/llvm-release_50/bin/clang -v
    clang version 5.0.1 (branches/release_50 326959)
    Target: x86_64-unknown-linux-gnu
    Thread model: posix
    InstalledDir: /opt/sbin/llvm-release_50/bin
    Found candidate GCC installation: /opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.3.1
    Found candidate GCC installation: /opt/rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/6.3.1
    Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.2
    Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.5
    Selected GCC installation: /opt/rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/6.3.1
    Candidate multilib: .;@m64
    Candidate multilib: 32;@m32
    Selected multilib: .;@m64
    

    Code (Text):
    /opt/sbin/llvm-release_40/bin/clang -v
    clang version 4.0.1 (branches/release_40 326956)
    Target: x86_64-unknown-linux-gnu
    Thread model: posix
    InstalledDir: /opt/sbin/llvm-release_40/bin
    Found candidate GCC installation: /opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.3.1
    Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.2
    Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.5
    Selected GCC installation: /opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.3.1
    Candidate multilib: .;@m64
    Candidate multilib: 32;@m32
    Selected multilib: .;@m64
    
     
  9. eva2000

    eva2000 Administrator Staff Member

    53,088
    12,107
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,640
    Local Time:
    7:31 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Good news GCC 8.1 coming soon GCC 8.1 RC1 Released, The Big Compiler Update Could Officially Debut Next Week - Phoronix

    Test Nginx 1.15.0 master branch + GCC 8.0.1 RC1 20180425 snapshot built custom RPMs with Profile Guided Optimizations (PGO) + LTO + Gold linker enabled.
    Code (Text):
    /opt/gcc-8.0.1-RC-20180425/bin/gcc -v
    Using built-in specs.
    COLLECT_GCC=/opt/gcc-8.0.1-RC-20180425/bin/gcc
    COLLECT_LTO_WRAPPER=/opt/gcc-8.0.1-RC-20180425/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
    Target: x86_64-redhat-linux
    Configured with: ../configure --prefix=/opt/gcc-8.0.1-RC-20180425 --disable-multilib --enable-bootstrap --enable-plugin --with-gcc-major-version-only --enable-shared --disable-nls --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-install-libiberty --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++ --enable-initfini-array --disable-libgcj --enable-gnu-indirect-function --with-tune=generic --build=x86_64-redhat-linux --enable-lto --enable-gold
    Thread model: posix
    gcc version 8.0.1 20180425 (prerelease) (GCC)
    

    Code (Text):
    RPMs Built
    /svr-setup/binutils-gcc8-2.30-1.el7.x86_64.rpm
    /svr-setup/gcc8-pgo-8.0-1.el7.x86_64.rpm
    
    ls -lah /svr-setup | egrep 'gcc8-pgo-8.0|binutils-gcc8-2.30'
    -rw-r--r--   1 root      root     5.3M Apr 25 21:52 binutils-gcc8-2.30-1.el7.x86_64.rpm
    -rw-r--r--   1 root      root      40M Apr 25 22:32 gcc8-pgo-8.0-1.el7.x86_64.rpm
    
    Installed Packages
    Name        : binutils-gcc8
    Arch        : x86_64
    Version     : 2.30
    Release     : 1.el7
    Size        : 48 M
    Repo        : installed
    Summary     : binutils-gcc8 for centminmod.com LEMP stack installs
    URL         : https://centminmod.com
    License     : unknown
    Description : binutils-gcc8 for centminmod.com LEMP stacks
    
    * Wed Apr 25 2018 George Liu <centminmod.com> 2.30
    - Binutils 2.30 for centminmod.com LEMP stack installs
    

    Code (Text):
    Installed Packages
    Name        : gcc8-pgo
    Arch        : x86_64
    Version     : 8.0
    Release     : 1.el7
    Size        : 301 M
    Repo        : installed
    Summary     : gcc8-pgo for centminmod.com LEMP stack installs
    URL         : https://centminmod.com
    License     : unknown
    Description : gcc8-pgo for centminmod.com LEMP stacks
    
    * Wed Apr 25 2018 George Liu <centminmod.com> 8
    - GCC 8 for centminmod.com LEMP stack installs
    

     
  10. eva2000

    eva2000 Administrator Staff Member

    53,088
    12,107
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,640
    Local Time:
    7:31 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+

    GCC 8.1.0 final tests



    Nginx 1.15.0 master branch + GCC 8.1.0 built custom RPMs with Profile Guided Optimizations (PGO) + LTO + Gold linker enabled.

    Code (Text):
    yum -q info gcc8-pgo   
    Installed Packages
    Name        : gcc8-pgo
    Arch        : x86_64
    Version     : 8.1
    Release     : 1.el7
    Size        : 301 M
    Repo        : installed
    Summary     : gcc8-pgo for centminmod.com LEMP stack installs
    URL         : https://centminmod.com
    License     : unknown
    Description : gcc8-pgo for centminmod.com LEMP stacks

    Code (Text):
    /opt/gcc8/bin/gcc -v
    Using built-in specs.
    COLLECT_GCC=/opt/gcc8/bin/gcc
    COLLECT_LTO_WRAPPER=/opt/gcc-8.1.0/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
    Target: x86_64-redhat-linux
    Configured with: ../configure --prefix=/opt/gcc-8.1.0 --disable-multilib --enable-bootstrap --enable-plugin --with-gcc-major-version-only --enable-shared --disable-nls --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-install-libiberty --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++ --enable-initfini-array --disable-libgcj --enable-gnu-indirect-function --with-tune=generic --build=x86_64-redhat-linux --enable-lto --enable-gold
    Thread model: posix
    gcc version 8.1.0 (GCC) 

     
  11. eva2000

    eva2000 Administrator Staff Member

    53,088
    12,107
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,640
    Local Time:
    7:31 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Building GCC 8.1.1 RPMs with Profile Guided Optimisations

    Code (Text):
    ld -v
    GNU ld (GNU Binutils) 2.30
    
    ld.gold -v
    GNU gold (GNU Binutils 2.30) 1.15

    Code (Text):
    gcc -v
    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/opt/gcc-8-20180608/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
    Target: x86_64-redhat-linux
    Configured with: ../configure --prefix=/opt/gcc-8-20180608 --disable-multilib --enable-bootstrap --enable-plugin --with-gcc-major-version-only --enable-shared --disable-nls --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-install-libiberty --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++ --enable-initfini-array --disable-libgcj --enable-gnu-indirect-function --with-tune=generic --build=x86_64-redhat-linux --enable-lto --enable-gold
    Thread model: posix
    gcc version 8.1.1 20180608 (GCC)

    Code (Text):
    yum info binutils-gcc8 -q
    IInstalled Packages
    Name        : binutils-gcc8
    Arch        : x86_64
    Version     : 2.30
    Release     : 1.el7
    Size        : 48 M
    Repo        : installed
    Summary     : binutils-gcc8 for centminmod.com LEMP stack installs
    URL         : https://centminmod.com
    License     : unknown
    Description : binutils-gcc8 for centminmod.com LEMP stacks
    
    * Fri Jun 15 2018 George Liu <centminmod.com> 2.30
    - Binutils 2.30 for centminmod.com LEMP stack installs

    Code (Text):
    yum info gcc8-pgo -q
    Installed Packages
    Name        : gcc8-pgo
    Arch        : x86_64
    Version     : 8.1.1
    Release     : 1.el7
    Size        : 301 M
    Repo        : installed
    Summary     : gcc8-pgo for centminmod.com LEMP stack installs
    URL         : https://centminmod.com
    License     : unknown
    Description : gcc8-pgo for centminmod.com LEMP stacks
    
    * Fri Jun 15 2018 George Liu <centminmod.com> 8
    - GCC 8 for centminmod.com LEMP stack installs
     
  12. eva2000

    eva2000 Administrator Staff Member

    53,088
    12,107
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,640
    Local Time:
    7:31 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Facebook has open sourced a new compilation optimisation tool, BOLT which requires Clang compiler Accelerate large-scale applications with BOLT and Facebook floats BOLT to jolt code out of bit bloat
    So testing Centmin Mod latest experimental Clang 6.0.1 compiler install first before looking at adding BOLT support

    Code (Text):
    /opt/sbin/llvm-release_60/bin/clang -v
    clang version 6.0.1 (branches/release_60 335101)
    Target: x86_64-unknown-linux-gnu
    Thread model: posix
    InstalledDir: /opt/sbin/llvm-release_60/bin
    Found candidate GCC installation: /opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.3.1
    Found candidate GCC installation: /opt/rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/6.3.1
    Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.2
    Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.5
    Selected GCC installation: /opt/rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/6.3.1
    Candidate multilib: .;@m64
    Candidate multilib: 32;@m32
    Selected multilib: .;@m64


     
  13. eva2000

    eva2000 Administrator Staff Member

    53,088
    12,107
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,640
    Local Time:
    7:31 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Just started testing Clang 7 master branch too :)
    Code (Text):
    /opt/sbin/llvm-release_master/bin/clang -v
    clang version 7.0.0 (https://github.com/llvm-mirror/clang 5e8547baedb21953ae64b6eb2830dcf1ff0d8768) (https://github.com/llvm-mirror/llvm 737553be0c9c25c497b45a241689994f177d5a5d)
    Target: x86_64-unknown-linux-gnu
    Thread model: posix
    InstalledDir: /opt/sbin/llvm-release_master/bin
    Found candidate GCC installation: /opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.3.1
    Found candidate GCC installation: /opt/rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/6.3.1
    Found candidate GCC installation: /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7
    Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.2
    Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.5
    Selected GCC installation: /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7
    Candidate multilib: .;@m64
    Candidate multilib: 32;@m32
    Selected multilib: .;@m64

     
  14. eva2000

    eva2000 Administrator Staff Member

    53,088
    12,107
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,640
    Local Time:
    7:31 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Spun up a 8 cpu Upcloud KVM with Intel Xeon E5-2687w v4 @ 3.0Ghz for some compiler testing and timings

    for Clang 6.0.1 compile time + binutils 2.30
    Code (Text):
    /opt/sbin/llvm-release_60/bin/clang -v
    clang version 6.0.1 (branches/release_60 335343)
    Target: x86_64-unknown-linux-gnu
    Thread model: posix
    InstalledDir: /opt/sbin/llvm-release_60/bin
    Found candidate GCC installation: /opt/rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/6.3.1
    Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.2
    Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.5
    Selected GCC installation: /opt/rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/6.3.1
    Candidate multilib: .;@m64
    Candidate multilib: 32;@m32
    Selected multilib: .;@m64
    
    ls -lah /opt/sbin/llvm-release_60/lib/LLVMgold.so
    -rwxr-xr-x 1 root root 29M Jun 22 13:27 /opt/sbin/llvm-release_60/lib/LLVMgold.so
    -------------------------------------------------------------------
    
    tail -1 /root/centminlogs/centminmod_llvm_220618-130008.log
    
    real    28m41.542s
    user    163m50.060s
    sys     13m50.991s
    

    for Clang 7.0.0 master branch compile time + binutils 2.30
    Code (Text):
    /opt/sbin/llvm-release_master/bin/clang -v
    clang version 7.0.0 (https://github.com/llvm-mirror/clang 84dae0555379696bff8fe6472ba402223ef04608) (https://github.com/llvm-mirror/llvm a054f92cdc4d1101988fcc3fac0673bc3ce794c5)
    Target: x86_64-unknown-linux-gnu
    Thread model: posix
    InstalledDir: /opt/sbin/llvm-release_master/bin
    Found candidate GCC installation: /opt/rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/6.3.1
    Found candidate GCC installation: /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7
    Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.2
    Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.5
    Selected GCC installation: /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7
    Candidate multilib: .;@m64
    Candidate multilib: 32;@m32
    Selected multilib: .;@m64
    
    ls -lah /opt/sbin/llvm-release_master/lib/LLVMgold.so
    -rwxr-xr-x 1 root root 29M Jun 22 13:43 /opt/sbin/llvm-release_master/lib/LLVMgold.so
    -------------------------------------------------------------------
    
    tail -1 /root/centminlogs/centminmod_llvm_220618-133337.log
    
    real    24m39.367s
    user    171m51.821s
    sys     13m37.691s
    

    for Profile Guided Optimized GCC 8.1.1 + binutils 2.30 + custom GCC and binutil RPM builds
    Code (Text):
    /opt/gcc-8-20180615/bin/gcc -v
    Using built-in specs.
    COLLECT_GCC=/opt/gcc-8-20180615/bin/gcc
    COLLECT_LTO_WRAPPER=/opt/gcc-8-20180615/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
    Target: x86_64-redhat-linux
    Configured with: ../configure --prefix=/opt/gcc-8-20180615 --disable-multilib --enable-bootstrap --enable-plugin --with-gcc-major-version-only --enable-shared --disable-nls --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-install-libiberty --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++ --enable-initfini-array --disable-libgcj --enable-gnu-indirect-function --with-tune=generic --build=x86_64-redhat-linux --enable-lto --enable-gold
    Thread model: posix
    gcc version 8.1.1 20180615 (GCC)
    

    Code (Text):
    RPMs Built
    /svr-setup/binutils-gcc8-2.30-1.el7.x86_64.rpm
    /svr-setup/gcc8-pgo-8.1.1-1.el7.x86_64.rpm
    
    ls -lah /svr-setup | egrep 'gcc8-pgo-8.1.1|binutils-gcc8-2.30'
    -rw-r--r--   1 root      root       5.2M Jun 22 14:37 binutils-gcc8-2.30-1.el7.x86_64.rpm
    -rw-r--r--   1 root      root        40M Jun 22 15:18 gcc8-pgo-8.1.1-1.el7.x86_64.rpm
    

    Code (Text):
    Installed Packages
    Name        : binutils-gcc8
    Arch        : x86_64
    Version     : 2.30
    Release     : 1.el7
    Size        : 48 M
    Repo        : installed
    Summary     : binutils-gcc8 for centminmod.com LEMP stack installs
    URL         : https://centminmod.com
    License     : unknown
    Description : binutils-gcc8 for centminmod.com LEMP stacks
    
    
    * Fri Jun 22 2018 George Liu <centminmod.com> 2.30
    - Binutils 2.30 for centminmod.com LEMP stack installs
    

    Code (Text):
    Installed Packages
    Name        : gcc8-pgo
    Arch        : x86_64
    Version     : 8.1.1
    Release     : 1.el7
    Size        : 301 M
    Repo        : installed
    Summary     : gcc8-pgo for centminmod.com LEMP stack installs
    URL         : https://centminmod.com
    License     : unknown
    Description : gcc8-pgo for centminmod.com LEMP stacks
    
    * Fri Jun 22 2018 George Liu <centminmod.com> 8
    - GCC 8 for centminmod.com LEMP stack installs
    

    Code (Text):
    *************************************************
    Compile GCC Completed
    log: /root/centminlogs/tools-gcc-install-pgo_220618-143449.log
    *************************************************
    
    Total Binutils + GCC Install Time: 2632.168653765 seconds
    
    real    43m52.190s
    user    191m12.389s
    sys     16m45.287s
    
     
  15. eva2000

    eva2000 Administrator Staff Member

    53,088
    12,107
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,640
    Local Time:
    7:31 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Wow upcoming GCC 8 patch for Intel Skylake based cpus can improve performance by up to 60% GCC 8 Hasn't Been Performing As Fast As It Should For Skylake With "-march=native" - Phoronix !

    Looking forward to this

     
  16. eva2000

    eva2000 Administrator Staff Member

    53,088
    12,107
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,640
    Local Time:
    7:31 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    GCC 8.2 stable release is out and up to 60% improvements for Intel Skylake cpus GCC 8.2 Released, GCC 8.3 Coming Around Year's End - Phoronix so ran updated testing for Centmin Mod Nginx compatibility

    Code (Text):
    /opt/gcc-8.2.0/bin/gcc -v
    Using built-in specs.
    COLLECT_GCC=/opt/gcc-8.2.0/bin/gcc
    COLLECT_LTO_WRAPPER=/opt/gcc-8.2.0/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
    Target: x86_64-redhat-linux
    Configured with: ../configure --prefix=/opt/gcc-8.2.0 --disable-multilib --enable-bootstrap --enable-plugin --with-gcc-major-version-only --enable-shared --disable-nls --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-install-libiberty --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++ --enable-initfini-array --disable-libgcj --enable-gnu-indirect-function --with-tune=generic --build=x86_64-redhat-linux --enable-lto --enable-gold
    Thread model: posix
    gcc version 8.2.0 (GCC) 
    

    Code (Text):
    RPMs Built
    /svr-setup/binutils-gcc8-2.31-1.el7.x86_64.rpm
    /svr-setup/gcc8-pgo-8.2.0-1.el7.x86_64.rpm
    
    ls -lah /svr-setup | egrep 'gcc8-pgo-8.2.0|binutils-gcc8-2.31'
    -rw-r--r--   1 root      root       5.2M Jul 26 22:50 binutils-gcc8-2.31-1.el7.x86_64.rpm
    -rw-r--r--   1 root      root        40M Jul 26 23:31 gcc8-pgo-8.2.0-1.el7.x86_64.rpm
    

    Code (Text):
    Installed Packages
    Name        : binutils-gcc8
    Arch        : x86_64
    Version     : 2.31
    Release     : 1.el7
    Size        : 47 M
    Repo        : installed
    Summary     : binutils-gcc8 for centminmod.com LEMP stack installs
    URL         : https://centminmod.com
    License     : unknown
    Description : binutils-gcc8 for centminmod.com LEMP stacks
    
    
    * Thu Jul 26 2018 George Liu <centminmod.com> 2.31
    - Binutils 2.31 for centminmod.com LEMP stack installs
    

    Code (Text):
    Installed Packages
    Name        : gcc8-pgo
    Arch        : x86_64
    Version     : 8.2.0
    Release     : 1.el7
    Size        : 301 M
    Repo        : installed
    Summary     : gcc8-pgo for centminmod.com LEMP stack installs
    URL         : https://centminmod.com
    License     : unknown
    Description : gcc8-pgo for centminmod.com LEMP stacks
    
    
    * Thu Jul 26 2018 George Liu <centminmod.com> 8
    - GCC 8 for centminmod.com LEMP stack installs
    

     
  17. eva2000

    eva2000 Administrator Staff Member

    53,088
    12,107
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,640
    Local Time:
    7:31 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Updated Centmin Mod 123.09beta01 for updated llvm-toolset-clang-7 version. Clang was updated from Clang 4.0.1 to Clang 5.0.1 so updated Centmin Mod CLANG_FIVE persistent config support for it.
    Code (Text):
    yum list updates -q
    Updated                            Packages
    llvm-toolset-7-clang.x86_64        5.0.1-4.el7  centos-sclo-rh
    llvm-toolset-7-clang-libs.x86_64   5.0.1-4.el7  centos-sclo-rh
    llvm-toolset-7-compiler-rt.x86_64  5.0.1-2.el7  centos-sclo-rh
    llvm-toolset-7-libomp.x86_64       5.0.1-2.el7  centos-sclo-rh
    llvm-toolset-7-llvm-libs.x86_64    5.0.1-8.el7  centos-sclo-rh
    llvm-toolset-7-llvm-static.x86_64  5.0.1-8.el7  centos-sclo-rh
    llvm-toolset-7-runtime.x86_64      5.0.1-4.el7  centos-sclo-rh
    

    For Clang 5.0.1 add CLANG_FIVE='y'
    Code (Text):
    LIBRESSL_SWITCH='n'
    CLANG_FIVE='y'
    CLANG='y'
    DEVTOOLSETSIX='n'
    DEVTOOLSETSEVEN='n'
    DEVTOOLSETEIGHT='n'
    NGINX_DEVTOOLSETGCC='y'
    

     
  18. eva2000

    eva2000 Administrator Staff Member

    53,088
    12,107
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,640
    Local Time:
    7:31 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+

    devtoolset-8 GCC 8.2.1 compiler testing



    First test in Centmin Mod 123.09beta01 and higher for devtoolset-8 support in CentOS. When DEVTOOLSETEIGHT='y' set in persistent config file /etc/centminmod/custom_config.inc, Nginx will be built with GCC 8.2.1 compiler instead of GCC 7.3.1 compiler when running centmin.sh menu option 4

    Code (Text):
    log files saved at /root/centminlogs
    -rw-r--r-- 1 root root    0 Feb  1 01:55 patch_opensslpatches_010219-015533.log
    -rw-r--r-- 1 root root   44 Feb  1 01:56 centminmod_opensslinstalltime_010219-015533.log
    -rw-r--r-- 1 root root  158 Feb  1 01:56 patch_patchnginx_010219-015533.log
    -rw-r--r-- 1 root root 8.0K Feb  1 01:57 nginx-configure-010219-015533.log
    -rw-r--r-- 1 root root  28K Feb  1 02:01 nginx_autoconf.err.010219-015533.log
    -rw-r--r-- 1 root root 1.5M Feb  1 02:01 centminmod_123.09beta01.b094_010219-015533_nginx_upgrade.log
    

    Code (Text):
    gcc --version
    gcc (GCC) 8.2.1 20180905 (Red Hat 8.2.1-3)
    Copyright (C) 2018 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    


    Using nginx-binary-backup.sh tool to backup Centmin Mod Nginx binary compiled with GCC 7.3.1 and 8.2.1 so can switch between them for comparative testing :)

    backup Nginx with GCC 7.3.1
    Code (Text):
    tools/nginx-binary-backup.sh backup
    --------------------------------------------------------
    backup current Nginx binary and dynamic modules
    --------------------------------------------------------
    backup started...
    --------------------------------------------------------
    /home/backup-nginxbin/1.15.8-gcc-7.3.1-20180303-openssl-1.1.1a-010219-022359-cfzlib
    +-- bin
    |   +-- nginx
    +-- dynamic-modules.conf
    +-- dynamic-modules-includes.conf
    +-- modules
        +-- ndk_http_module.so
        +-- ngx_http_brotli_filter_module.so
        +-- ngx_http_brotli_static_module.so
        +-- ngx_http_echo_module.so
        +-- ngx_http_fancyindex_module.so
        +-- ngx_http_headers_more_filter_module.so
        +-- ngx_http_image_filter_module.so
        +-- ngx_http_set_misc_module.so
    
    2 directories, 11 files
    backup finished...
    --------------------------------------------------------
    backup created at /home/backup-nginxbin/1.15.8-gcc-7.3.1-20180303-openssl-1.1.1a-010219-022359-cfzlib
    --------------------------------------------------------
    

    backup Nginx with GCC 8.2.1
    Code (Text):
    tools/nginx-binary-backup.sh backup
    --------------------------------------------------------
    backup current Nginx binary and dynamic modules
    --------------------------------------------------------
    backup started...
    --------------------------------------------------------
    /home/backup-nginxbin/1.15.8-gcc-8.2.1-20180905-openssl-1.1.1a-010219-022005-cfzlib
    +-- bin
    |   +-- nginx
    +-- dynamic-modules.conf
    +-- dynamic-modules-includes.conf
    +-- modules
        +-- ndk_http_module.so
        +-- ngx_http_brotli_filter_module.so
        +-- ngx_http_brotli_static_module.so
        +-- ngx_http_echo_module.so
        +-- ngx_http_fancyindex_module.so
        +-- ngx_http_headers_more_filter_module.so
        +-- ngx_http_image_filter_module.so
        +-- ngx_http_set_misc_module.so
    
    2 directories, 11 files
    backup finished...
    --------------------------------------------------------
    backup created at /home/backup-nginxbin/1.15.8-gcc-8.2.1-20180905-openssl-1.1.1a-010219-022005-cfzlib
    

    list all backed up nginx binaries
    Code (Text):
    tools/nginx-binary-backup.sh list
    --------------------------------------------------------
    Listing of available Nginx binary/module backups
    --------------------------------------------------------
    /home/backup-nginxbin/1.15.8-gcc-8.2.1-20180905-openssl-1.1.1a-010219-022005-cfzlib
    /home/backup-nginxbin/1.15.8-gcc-7.3.1-20180303-openssl-1.1.1a-010219-022359-cfzlib
    --------------------------------------------------------
    


    Nginx HTTP/2 HTTPS h2load Benchmarks



    Next up comparing Centmin Mod Nginx 1.15.8 built with GCC 8.2.1 vs GCC 7.3.1 vs GCC 4.8.5 vs Clang 5.0.1 where GCC 4.8.5 is CentOS 7 default compiler and others are provided by SCL Yum repo via devtoolset.

    Using nginx-binary-backup.sh allows me to compile each Nginx binary once and switch between them for comparison testing without needing to source compile them again.
    Code (Text):
    tools/nginx-binary-backup.sh list
    --------------------------------------------------------
    Listing of available Nginx binary/module backups
    --------------------------------------------------------
    /home/backup-nginxbin/1.15.8-gcc-7.3.1-20180303-openssl-1.1.1a-010219-022359-cfzlib
    /home/backup-nginxbin/1.15.8-gcc-8.2.1-20180905-openssl-1.1.1a-010219-122942-cfzlib
    /home/backup-nginxbin/1.15.8-gcc-4.8.5-20150623-openssl-1.1.1a-010219-125105-cfzlib
    /home/backup-nginxbin/1.15.8-clang-5.0.1-tags-RELEASE_501-final-openssl-1.1.1a-010219-131850-cfzlib
    --------------------------------------------------------
    


    System:
    I ran https_bench.sh benchmark which will test both standard RSA 2048bit SSL certificate Nginx HTTP/2 HTTPS as well as more performant ECC 256bit ECDSA SSL certificate configurations which you will see perform much better especially with Intel Skylake cpus and when using Nginx Brotli HTTP compression instead of default Gzip HTTP compression. Updated February 21, 2019 - the assumption was flawed that Intel Skylake cpus accelerated brotli compression when it fact it was an incorrect ngx_brotli setting set in Centmin Mod Nginx default settings as explained here.

    Centmin Mod 123.09beta01 beta optionally supports Nginx Brotli compression as outlined here. And was enabled for below benchmarks.

    Nginx HTTP/2 HTTPS with RSA 2048bit SSL certificates



    Centmin Mod HTTP/2 HTTPS configurations default to AES128 variant of each SSL ciphers, so you'd want to be reading those results rather than AES256 variant. Note, results are highly dependent on the cpu model/family being used to compile Nginx. The results are for Intel Xeon Silver 4114 Skylake based processor.
    • For RSA 2048bit SSL certificates with gzip compression and AES128 fastest was GCC 7.3.1, then GCC 8.2.1, then Clang 5.0.1 and last place GCC 4.8.5.
    • For RSA 2048bit SSL certificates with brotli compression and AES128 fastest was GCC 4.8.5, then GCC 7.3.1, then Clang 5.0.1 and last place GCC 8.2.1.
    • So for all round performance with specific Intel Xeon Silver 4114 Skylake, GCC 7.3.1 would have best balance for gzip and brotli compression based Nginx HTTP/2 HTTPS performance.
    nginx-h2load-rsa2048-bit-01.png
    nginx-h2load-rsa2048-bit-table-01.png

    Nginx HTTP/2 HTTPS with ECC 256bit ECDSA SSL certificates



    Centmin Mod HTTP/2 HTTPS configurations default to AES128 variant of each SSL ciphers, so you'd want to be reading those results rather than AES256 variant. Note, results are highly dependent on the cpu model/family being used to compile Nginx. The results are for Intel Xeon Silver 4114 Skylake based processor. Updated February 21, 2019 - the assumption was flawed that Intel Skylake cpus accelerated brotli compression when it fact it was an incorrect ngx_brotli setting set in Centmin Mod Nginx default settings as explained here.

    • For ECC 256bit ECDSA SSL certificates with gzip compression and AES128 fastest was GCC 8.2.1, then Clang 5.0.1, then GCC 7.3.1 and last place GCC 4.8.5.
    • For ECC 256bit ECDSA SSL certificates with brotli compression and AES128 fastest was GCC 7.3.1, then GCC 4.8.5, then GCC 8.2.1 and last place Clang 5.0.1.
    • So for all round performance with specific Intel Xeon Silver 4114 Skylake, GCC 7.3.1 or GCC 8.2.1 would have best balance for gzip and brotli compression based Nginx HTTP/2 HTTPS performance depending on whether you're using brotli compression. Updated February 21, 2019 - the assumption was flawed that Intel Skylake cpus accelerated brotli compression when it fact it was an incorrect ngx_brotli setting set in Centmin Mod Nginx default settings as explained here.

    nginx-h2load-ecdsa256-bit-01.png
    nginx-h2load-ecdsa256-bit-table-01.png

    nginx + GCC 8.2.1
    nginx + GCC 7.3.1
    nginx + GCC 4.8.5
    nginx + Clang 5.0.1
     
    Last edited: Feb 21, 2019
  19. eva2000

    eva2000 Administrator Staff Member

    53,088
    12,107
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,640
    Local Time:
    7:31 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+

    Custom GCC 8.3.1 & GCC 9.0.1 RPM Builds



    Private testing for custom GCC 8.3.1 and GCC 9.0.1 RPM builds :D
    Code (Text):
    yum info gcc9 -q         
    Installed Packages
    Name        : gcc9
    Arch        : x86_64
    Version     : 9.0.1
    Release     : 1.el7
    Size        : 320 M
    Repo        : installed
    Summary     : gcc9 for centminmod.com LEMP stack installs
    URL         : https://centminmod.com
    License     : unknown
    Description : gcc9 for centminmod.com LEMP stacks
    

    Code (Text):
    yum info gcc8-pgo -q
    Installed Packages
    Name        : gcc8-pgo
    Arch        : x86_64
    Version     : 8.2.1
    Release     : 1.el7
    Size        : 302 M
    Repo        : installed
    Summary     : gcc8-pgo for centminmod.com LEMP stack installs
    URL         : https://centminmod.com
    License     : unknown
    Description : gcc8-pgo for centminmod.com LEMP stacks
    

    Code (Text):
    /opt/gcc-9-20190224/bin/gcc -v
    Using built-in specs.
    COLLECT_GCC=/opt/gcc-9-20190224/bin/gcc
    COLLECT_LTO_WRAPPER=/opt/gcc-9-20190224/libexec/gcc/x86_64-redhat-linux/9/lto-wrapper
    Target: x86_64-redhat-linux
    Configured with: ../configure --prefix=/opt/gcc-9-20190224 --disable-multilib --enable-bootstrap --enable-plugin --with-gcc-major-version-only --enable-shared --disable-nls --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-install-libiberty --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++ --enable-initfini-array --disable-libgcj --enable-gnu-indirect-function --with-tune=generic --build=x86_64-redhat-linux --enable-lto --enable-gold
    Thread model: posix
    gcc version 9.0.1 20190224 (experimental) (GCC)
    

    Code (Text):
    /opt/gcc-8-20190222/bin/gcc -v
    Using built-in specs.
    COLLECT_GCC=/opt/gcc-8-20190222/bin/gcc
    COLLECT_LTO_WRAPPER=/opt/gcc-8-20190222/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
    Target: x86_64-redhat-linux
    Configured with: ../configure --prefix=/opt/gcc-8-20190222 --disable-multilib --enable-bootstrap --enable-plugin --with-gcc-major-version-only --enable-shared --disable-nls --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-install-libiberty --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++ --enable-initfini-array --disable-libgcj --enable-gnu-indirect-function --with-tune=generic --build=x86_64-redhat-linux --enable-lto --enable-gold
    Thread model: posix
    gcc version 8.3.1 20190222 (GCC)
    

     
  20. eva2000

    eva2000 Administrator Staff Member

    53,088
    12,107
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,640
    Local Time:
    7:31 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+

    Clang 7.1.0 & Clang 8.0.0 Builds



    More compiler testing on CentOS 7 for Clang 7.1.0 and Clang 8.0.0 which is about to be released. So eventually Centmin Mod will support building Nginx and PHP-FPM with GCC 4.4/4.8 native, GCC 7.3.1, GCC 8.2.1, GCC 8.3.1, GCC 9.0.1 and Clang 3.4, 4.01, 5.0.1, 6.0.1, 7.1.0 and 8.0.0 :D

    These Clang 7.1 and Clang 8.0 binaries were build with GCC 7.3.1 via devtoolset-7.
    Code (Text):
    /opt/sbin/llvm-release_70/bin/clang -v
    clang version 7.1.0 (branches/release_70 354890)
    Target: x86_64-unknown-linux-gnu
    Thread model: posix
    InstalledDir: /opt/sbin/llvm-release_70/bin
    Found candidate GCC installation: /opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.3.1
    Found candidate GCC installation: /opt/rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/6.3.1
    Found candidate GCC installation: /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7
    Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.2
    Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.5
    Selected GCC installation: /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7
    Candidate multilib: .;@m64
    Candidate multilib: 32;@m32
    Selected multilib: .;@m64
    
    ls -lah /opt/sbin/llvm-release_70/lib/LLVMgold.so
    -rwxr-xr-x 1 root root 29M Feb 26 16:31 /opt/sbin/llvm-release_70/lib/LLVMgold.so
    

    Code (Text):
    /opt/sbin/llvm-release_80/bin/clang -v
    clang version 8.0.0 (branches/release_80 354893)
    Target: x86_64-unknown-linux-gnu
    Thread model: posix
    InstalledDir: /opt/sbin/llvm-release_80/bin
    Found candidate GCC installation: /opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.3.1
    Found candidate GCC installation: /opt/rh/devtoolset-6/root/usr/lib/gcc/x86_64-redhat-linux/6.3.1
    Found candidate GCC installation: /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7
    Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.2
    Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.5
    Selected GCC installation: /opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7
    Candidate multilib: .;@m64
    Candidate multilib: 32;@m32
    Selected multilib: .;@m64
    
    ls -lah /opt/sbin/llvm-release_80/lib/LLVMgold.so
    -rwxr-xr-x 1 root root 31M Feb 26 17:10 /opt/sbin/llvm-release_80/lib/LLVMgold.so
    


    Nginx built with Clang 8.0.0
    Nginx built with Clang 7.1.0
     
    Last edited: Feb 27, 2019
Thread Status:
Not open for further replies.