Learn about Centmin Mod LEMP Stack today
Become a Member

CLOUDFLARE_ZLIB='y' detected but cpu SSE4.2 or AES-NI support not availabl

Discussion in 'Install & Upgrades or Pre-Install Questions' started by adamus007p, Oct 20, 2019.

  1. adamus007p

    adamus007p Premium Member Premium Member

    104
    5
    18
    Feb 8, 2019
    Ratings:
    +6
    Local Time:
    8:43 PM
    • CentOS Version: i.e. CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.17.4
    • PHP Version Installed: i.e. 7.2.9
    • MariaDB MySQL Version Installed: 10.2.xx
    • When was last time updated Centmin Mod code base ? : today 19.10.2019
    • Persistent Config:
    Code:
    NGINX_SSLCACHE_ALLOWOVERRIDE='y'
    SET_DEFAULT_MYSQLCHARSET='utf8mb4'
    AUTOHARDTUNE_NGINXBACKLOG='y'
    ZSTD_LOGROTATE_NGINX='y'
    ZSTD_LOGROTATE_PHPFPM='y'
    NGINX_LIBBROTLI='y'
    NGXDYNAMIC_BROTLI='y'
    PHP_PGO='y'
    PHP_BROTLI='y'
    PHP_LZFOUR='y'
    PHP_LZF='y'
    PHP_ZSTD='y'
    LETSENCRYPT_DETECT='y'
    DUALCERTS='y'
    AUDITD_ENABLE='y'
    

    I wanted to update centminmode to newest version and add all preinstall config.

    I see warning:
    * CLOUDFLARE_ZLIB='y' detected but cpu SSE4.2 or AES-NI support not available
    * Fallback to standard zlib support in Nginx due to SSE4.2 not supported

    What I should to do?


    My first install was only from URL I didn't have any Persistent Config.

    First I have used cmupdate then I used
    Install - Discussion: how do you initially install & setup your Centmin Mod server?
    created a file and use echo to add all things. Then I have update ngix to newest version.

    and I saw warning/info

    * CLOUDFLARE_ZLIB='y' detected but cpu SSE4.2 or AES-NI support not available
    * Fallback to standard zlib support in Nginx due to SSE4.2 not supported

    Is there something wrong?
    Anyway i don't use clouldflare at this VPS. I use Router53 and geoDNS.
     
  2. eva2000

    eva2000 Administrator Staff Member

    42,078
    9,497
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,613
    Local Time:
    5:43 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    nothing needed to do, your cpu doesn't support SSE4.2 or AES-NI so Centmin Mod automatically switches Nginx building to using standard zlib for HTTP Gzip requests.

    you can run command
    Code (Text):
    lscpu

    or
    Code (Text):
    cat /proc/cpuinfo

    to find cpu model you use and cpu flags supported

    But nothing to do unless you change cpus with support as such. Differ is Cloudflare Zlib forked builds of Nginx have ~30-40% better HTTP Gzip encoded request performance compared to standard zlib built Nginx.
     
  3. adamus007p

    adamus007p Premium Member Premium Member

    104
    5
    18
    Feb 8, 2019
    Ratings:
    +6
    Local Time:
    8:43 PM
    Hello @eva2000 this is my CPU:
    Is it supported: support SSE4.2 or AES-NI ?

    flag: sse4_2 is not the SSE4.2? or aes is not AES-NI ?

    Code (Text):
    lscpu
    Architecture:          x86_64
    CPU op-mode(s):        32-bit, 64-bit
    Byte Order:            Little Endian
    CPU(s):                2
    On-line CPU(s) list:   0,1
    Thread(s) per core:    1
    Core(s) per socket:    1
    Socket(s):             2
    NUMA node(s):          1
    Vendor ID:             GenuineIntel
    CPU family:            6
    Model:                 62
    Model name:            Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
    Stepping:              4
    CPU MHz:               2799.923
    BogoMIPS:              5599.84
    Hypervisor vendor:     KVM
    Virtualization type:   full
    L1d cache:             32K
    L1i cache:             32K
    L2 cache:              4096K
    NUMA node0 CPU(s):     0,1
    Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc nopl eagerfpu pni ssse3 cx16 sse4_1 sse4_2 x2apic popcnt aes hypervisor lahf_lm xsaveopt xsavec
    


    Code (Text):
    cat /proc/cpuinfo
    
    processor       : 0
    vendor_id       : GenuineIntel
    cpu family      : 6
    model           : 62
    model name      : Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
    stepping        : 4
    cpu MHz         : 2799.923
    cache size      : 4096 KB
    physical id     : 0
    siblings        : 1
    core id         : 0
    cpu cores       : 1
    apicid          : 0
    initial apicid  : 0
    fpu             : yes
    fpu_exception   : yes
    cpuid level     : 13
    wp              : yes
    flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc nopl eagerfpu pni ssse3 cx16 sse4_1 sse4_2 x2apic popcnt aes hypervisor lahf_lm xsaveopt xsavec
    bogomips        : 5599.84
    clflush size    : 64
    cache_alignment : 64
    address sizes   : 40 bits physical, 48 bits virtual
    power management:
    
    processor       : 1
    vendor_id       : GenuineIntel
    cpu family      : 6
    model           : 62
    model name      : Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
    stepping        : 4
    cpu MHz         : 2799.923
    cache size      : 4096 KB
    physical id     : 0
    siblings        : 1
    core id         : 0
    cpu cores       : 1
    apicid          : 0
    initial apicid  : 0
    fpu             : yes
    fpu_exception   : yes
    cpuid level     : 13
    wp              : yes
    flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc nopl eagerfpu pni ssse3 cx16 sse4_1 sse4_2 x2apic popcnt aes hypervisor lahf_lm xsaveopt xsavec
    bogomips        : 5599.84
    clflush size    : 64
    cache_alignment : 64
    address sizes   : 40 bits physical, 48 bits virtual
    power management:
    
     
  4. eva2000

    eva2000 Administrator Staff Member

    42,078
    9,497
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,613
    Local Time:
    5:43 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Your cpu has AES-NI via aes flag on lscpu output but it's missing the other cpu flag for Cloudflare ZLIB = pclmulqdq. Your cpu's bios settings the web host setup might have disabled AES-NI in bios so even if cpu supports AES-NI, it's been disabled by your web host.
     
  5. tininho

    tininho Premium Member Premium Member

    40
    4
    8
    May 22, 2019
    Ratings:
    +17
    Local Time:
    9:43 PM
    What about the performance when compared to
    NGINX_ZLIBNG='y' # 64bit OS only for Nginx compiled against zlib-ng zlib-ng/zlib-

    From what I gathered so far zlib-ng has " integrated both the Cloudflare and Intel forks, where they didn't overlap, and has done more work beyond thos".

    It seemed to work just fine (Wordpress) when Nginx is rebuilt with NGINX_ZLIBNG='y'.

    Also ebiggers/libdeflate seems to be superfast for static files?
     
  6. eva2000

    eva2000 Administrator Staff Member

    42,078
    9,497
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,613
    Local Time:
    5:43 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    surprised that worked as NGINX_ZLIBNG='y' is broken from when i last tested it and wouldn't properly compile with Nginx. What is output for
    Code (Text):
    nginx -V
     
  7. tininho

    tininho Premium Member Premium Member

    40
    4
    8
    May 22, 2019
    Ratings:
    +17
    Local Time:
    9:43 PM
    Here we go, what does this mean:
    --with-zlib=../zlib-ng --with-zlib=../zlib-1.2.11

    Code (Text):
    nginx -V
    nginx version: nginx/1.17.4 (211019-205907-centos7-kvm)
    built by gcc 8.3.1 20190311 (Red Hat 8.3.1-3) (GCC)
    built with OpenSSL 1.1.1d  10 Sep 2019
    TLS SNI support enabled
    configure arguments: --with-ld-opt='-Wl,-E -L/usr/local/lib -ljemalloc -Wl,-z,relro -Wl,-rpath,/usr/local/lib -flto=6 -fuse-ld=gold' --with-cc-opt='-I/usr/local/include -m64 -march=native -DTCP_FASTOPEN=23 -g -O3 -Wno-error=strict-aliasing -fstack-protector-strong -flto=6 -fuse-ld=gold --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wimplicit-fallthrough=0 -fcode-hoisting -Wno-cast-function-type -Wno-format-extra-args -Wp,-D_FORTIFY_SOURCE=2 -Wno-deprecated-declarations' --sbin-path=/usr/local/sbin/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --build=211019-205907-centos7-kvm --with-compat --with-http_stub_status_module --with-http_secure_link_module --with-libatomic --with-http_gzip_static_module --add-dynamic-module=../ngx_brotli --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 --with-stream_ssl_module --with-http_realip_module --add-dynamic-module=../ngx-fancyindex-0.4.2 --add-module=../ngx_cache_purge-2.5 --add-dynamic-module=../ngx_devel_kit-0.3.0 --add-dynamic-module=../set-misc-nginx-module-0.32 --add-dynamic-module=../echo-nginx-module-0.61 --add-module=../redis2-nginx-module-0.15 --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-jit [B]--with-zlib=../zlib-ng --with-zlib=../zlib-1.2.11[/B] --with-http_ssl_module --with-http_v2_module --with-http_v2_hpack_enc --with-openssl=../openssl-1.1.1d


    Build seems fine? From nginx upgrade log:
    Code (Text):
    install zlib-ng...
    
    /svr-setup /svr-setup/nginx-1.17.4
    Cloning into 'zlib-ng'...
    
    real    0m1.731s
    user    0m0.368s
    sys    0m0.076s
    Checking for compiler... ccache /usr/bin/gcc
    Checking for shared library support... Building shared library libz.so.1.2.11.zlib-ng with ccache /usr/bin/gcc.
    Checking for off64_t... Yes.
    Checking for fseeko... Yes.
    Checking for strerror... Yes.
    Checking for unistd.h... Yes.
    Checking for ptrdiff_t... Yes.
    Checking for ANSI C compliant compiler...  Yes.
    Checking for attribute(visibility(hidden)) support... Yes.
    Checking for attribute(visibility(internal)) support... Yes.
    Checking for __builtin_ctzl ... Yes.
    Checking for SSE4.2 CRC intrinsics ... Yes.
    Checking for PCLMULQDQ intrinsics ... Yes.
    Checking for sys/sdt.h ... Yes.
    ARCH: x86_64
    Using arch directory: arch/x86
    /svr-setup/nginx-1.17.4
    
    zlib-ng installed


    Custom_config:
    tinof/centmininit
     
  8. eva2000

    eva2000 Administrator Staff Member

    42,078
    9,497
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,613
    Local Time:
    5:43 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    bugged only one --with-zlib should be there so updated 123.09beta01 just now
     
  9. tininho

    tininho Premium Member Premium Member

    40
    4
    8
    May 22, 2019
    Ratings:
    +17
    Local Time:
    9:43 PM
    Yeah ok, now it does not work:

    Code (Text):
    Using arch directory: arch/x86
    make[2]: Entering directory `/svr-setup/zlib-ng'
    make[2]: *** No rule to make target `libz.a'.  Stop.
    make[2]: Leaving directory `/svr-setup/zlib-ng'
    make[1]: *** [../zlib-ng/libz.a] Error 2
    make[1]: *** Waiting for unfinished jobs....
    
    (...)
    
    make[1]: Leaving directory `/svr-setup/nginx-1.17.4'
    make: *** [build] Error 2
    
    real    0m22.883s
    user    1m45.413s
    sys 0m19.790s
    
    Tue Oct 22 08:21:34 UTC 2019
    Error: 2, Nginx make failed
     
    • Informative Informative x 1
  10. eva2000

    eva2000 Administrator Staff Member

    42,078
    9,497
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,613
    Local Time:
    5:43 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    yeah before the standard -with-zlib line made it work, once you remove that zlib-ng doesn't work