Want more timely Centmin Mod News Updates?
Become a Member

Nginx Optimized Nginx by Google developers

Discussion in 'Nginx and PHP-FPM news & discussions' started by bassie, Mar 22, 2018.

Tags:
  1. bassie

    bassie Well-Known Member

    1,029
    247
    63
    Apr 29, 2016
    Ratings:
    +731
    Local Time:
    10:11 AM
    The repo below is webserver Nginx maintained by Google developers.
    In short Nginx with enhancement code.
    Code in Patch format is offered to upstream Nginx and can be found on the Nginx developer list.

    The configure file is located in the auto folder.

    https://nginx.googlesource.com/nginx/

     
    • Informative Informative x 3
  2. eva2000

    eva2000 Administrator Staff Member

    37,305
    8,151
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,547
    Local Time:
    7:11 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Woah more goodies to borrow inspiration from hehe :D:cool:
     
  3. JJC84

    JJC84 Premium Member Premium Member

    177
    74
    28
    Jan 31, 2018
    Ratings:
    +107
    Local Time:
    3:11 AM
    1.13.9
    10.1
    Awesome. Can't beat that.
     
  4. eva2000

    eva2000 Administrator Staff Member

    37,305
    8,151
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,547
    Local Time:
    7:11 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Did test install of Google Nginx master branch which is set to 1.13.9 still instead of 1.13.10, Cloudflare HPACK patch breaks on Google Nginx master 1.13.9 so has to be disabled.
     
  5. eva2000

    eva2000 Administrator Staff Member

    37,305
    8,151
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,547
    Local Time:
    7:11 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    not finding the Google Nginx specific patches on mailing list ?

    Did quick wrk-cmm benchmarks for Official Nginx 1.13.9 source code built Centmin Mod Nginx vs Google Nginx master branch 1.13.9 built Centmin Mod Nginx. Pretty close for simple tests.

    Official Nginx 1.13.9 source code built Centmin Mod Nginx


    • 29,869.22 requests/sec
    • avg thread latency = 10.17ms
    • max thread latency = 259.45ms
    Code (Text):
    -----------------------------------------------------------------------------------
    ./nginx-1139 -V
    nginx version: nginx/1.13.9 built by gcc 8.0.1 built with OpenSSL 1.1.1-pre3 TLS SNI support enabled
    configure arguments: --with-ld-opt='-L/usr/local/lib -ljemalloc -Wl,-z,relro -Wl,-rpath,/usr/local/lib' --with-cc-opt='-I/usr/local/include -m64 -march=native -DTCP_FASTOPEN=23 -g -O3 -Wno-error=strict-aliasing -fstack-protector-strong -flto -fuse-ld=gold --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wimplicit-fallthrough=0 -fcode-hoisting -Wno-cast-function-type -Wp,-D_FORTIFY_SOURCE=2 -Wno-deprecated-declarations' --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 --add-dynamic-module=../nginx-module-vts --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=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-cloudflare-1.3.0 --with-http_ssl_module --with-http_v2_module --with-http_v2_hpack_enc --with-openssl=../openssl-1.1.1-pre3 --with-openssl-opt='enable-ec_nistp_64_gcc_128 enable-tls1_3'
    
    start newbins/nginx-1139
    
    HTTP/1.1 200 OK
    Date: Thu, 22 Mar 2018 05:27:30 GMT
    Content-Type: text/html; charset=utf-8
    Content-Length: 3801
    Last-Modified: Mon, 17 Jul 2017 15:03:09 GMT
    Connection: keep-alive
    Vary: Accept-Encoding
    ETag: "596cd1ad-ed9"
    Server: nginx centminmod
    X-Powered-By: centminmod
    Accept-Ranges: bytes
    
    
    /usr/local/bin/wrk-cmm -t3 -c300 -d30s --breakout -H 'Accept-Encoding: gzip' -s scripts/setup.lua http://localhost/
    thread 1 created
    thread 2 created
    thread 3 created
    Running 30s test @ http://localhost/
      3 threads and 300 connections
      Thread Stats   Avg      Stdev     Max   +/- Stdev
        Latency    10.17ms    5.86ms 259.45ms   79.35%
        Connect   432.18us    1.08ms   5.01ms   88.37%
        TTFB       10.17ms    5.86ms 259.44ms   79.34%
        TTLB        2.01us   12.59us   8.50ms   99.98%
        Req/Sec    10.01k     1.12k   14.14k    68.89%
      896627 requests in 30.02s, 1.58GB read
    Requests/sec:  29869.22
    Transfer/sec:     54.04MB
    thread 1 made 298501 requests and got 298401 responses
    thread 2 made 299728 requests and got 299629 responses
    thread 3 made 298696 requests and got 298597 responses
    

    Google Nginx master branch 1.13.9 built Centmin Mod Nginx


    • 29,211.57 requests/sec
    • avg thread latency = 10.44ms
    • max thread latency = 282.56ms
    Code (Text):
    -----------------------------------------------------------------------------------
    ./nginx-master-google -V
    nginx version: nginx/1.13.9 built by gcc 8.0.1 built with OpenSSL 1.1.1-pre3 TLS SNI support enabled
    configure arguments: --with-ld-opt='-L/usr/local/lib -ljemalloc -Wl,-z,relro -Wl,-rpath,/usr/local/lib' --with-cc-opt='-I/usr/local/include -m64 -march=native -DTCP_FASTOPEN=23 -g -O3 -fstack-protector-strong -flto -fuse-ld=gold --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wimplicit-fallthrough=0 -fcode-hoisting -Wno-cast-function-type -Wp,-D_FORTIFY_SOURCE=2 -Wno-deprecated-declarations' --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 --add-dynamic-module=../nginx-module-vts --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=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-cloudflare-1.3.0 --with-http_ssl_module --with-http_v2_module --with-openssl=../openssl-1.1.1-pre3 --with-openssl-opt='enable-ec_nistp_64_gcc_128 enable-tls1_3'
    
    start newbins/nginx-master-google
    
    HTTP/1.1 200 OK
    Date: Thu, 22 Mar 2018 05:28:16 GMT
    Content-Type: text/html; charset=utf-8
    Content-Length: 3801
    Last-Modified: Mon, 17 Jul 2017 15:03:09 GMT
    Connection: keep-alive
    Vary: Accept-Encoding
    ETag: "596cd1ad-ed9"
    Server: nginx centminmod
    X-Powered-By: centminmod
    Accept-Ranges: bytes
    
    
    /usr/local/bin/wrk-cmm -t3 -c300 -d30s --breakout -H 'Accept-Encoding: gzip' -s scripts/setup.lua http://localhost/
    thread 1 created
    thread 2 created
    thread 3 created
    Running 30s test @ http://localhost/
      3 threads and 300 connections
      Thread Stats   Avg      Stdev     Max   +/- Stdev
        Latency    10.44ms    5.81ms 282.56ms   87.28%
        Connect   248.40us  601.84us   3.21ms   88.37%
        TTFB       10.44ms    5.81ms 282.55ms   87.27%
        TTLB        2.08us    9.48us   4.09ms   99.97%
        Req/Sec     9.79k   704.18    11.31k    71.33%
      877047 requests in 30.02s, 1.55GB read
    Requests/sec:  29211.57
    Transfer/sec:     52.85MB
    thread 1 made 290949 requests and got 290848 responses
    thread 2 made 294202 requests and got 294103 responses
    thread 3 made 292195 requests and got 292096 responses
    
     
    • Winner Winner x 1
  6. bassie

    bassie Well-Known Member

    1,029
    247
    63
    Apr 29, 2016
    Ratings:
    +731
    Local Time:
    10:11 AM
    Check for Piotr Sikora.
    A lot of patches a few months ago.
    Otherwise diff the upstream Nginx with Google Nginx code.
     
    • Informative Informative x 1
  7. eva2000

    eva2000 Administrator Staff Member

    37,305
    8,151
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,547
    Local Time:
    7:11 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    original ngx_brotli guy - guess you now know where he's been busy :)
    Interesting from Google's Nginx code https://nginx-review.googlesource.com/c/nginx/+/3140
    Guess Google Nginx code still operates on Nginx upstream default HTTP/2 HPACK partial encoding rather than HTTP/2 HPACK Full Encoding which Cloudflare's patch can enable.

    stuff to do in spare time i guess :)
     
  8. bassie

    bassie Well-Known Member

    1,029
    247
    63
    Apr 29, 2016
    Ratings:
    +731
    Local Time:
    10:11 AM
    Cloudflare is not a saint, their approach is not sacred either.
    There are more developers c.q. company's with great ideas for Nginx.

    And since Cloudflare apparently have stopped contributing to there own open sourced code. As discussed of here.

    I would not stay focused on mission closed, because the road is closed.
    Google's edition of Nginx is working fine.

    Next step could be to mix the best of Cloudflare and Google into 1 Nginx.
    For example Google's Nginx with Cloudflare TLS dynamic patch.

    Or else, there are enough options.
     
    • Agree Agree x 1
  9. eva2000

    eva2000 Administrator Staff Member

    37,305
    8,151
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,547
    Local Time:
    7:11 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Indeed. For now Centmin Mod Nginx will still use Nginx official code. Centmin Mod 123.09beta01 just added optional support to use Google's Nginx forked code base via nginx version = master-google when used. I disabled Cloudflare's Dynmaic TLS patch when master-google nginx version is used right now Disable Cloudflare Dynamic TLS Record Size Patch for Google Nginx fork ยท centminmod/[email protected] :) Also previously disabled Cloudflare's HPACK Full Encoding patch when master-google nginx version is used
     
..