Discover Centmin Mod today
Register Now

Beta Branch enable TCP Fast Open support if system supports it

Discussion in 'Centmin Mod Github Commits' started by eva2000, Apr 10, 2017.

  1. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    2:33 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    enable TCP Fast Open support if system supports it


    If system supports TCP Fast Open, enable support for it on system and within Nginx web server TCP Fast Open - Wikipedia.

    Once enabled in Nginx, you need to setup only one instance listen directive with fastopen=256 paramter as per Module ngx_http_core_module. Example add to listen line for /usr/local/nginx/conf/conf.d/virtual.conf

    Continue reading...

    123.09beta01 branch
     
    Last edited: Apr 10, 2017
  2. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    2:33 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    More info at TCP Fast Open: expediting web services [LWN.net]
    Just note both client and web server end need to support TCP Fast Open and that only happens on Linux systems on both ends. So Windows based visitors won't support TCP Fast Open even if web server - Centmin Mod Nginx supports TCP Fast Open.

    You can possibly test this with webpagetest.org as they have a new test location with Linux based client side instead of the normal Windows or Android client side for Dulles, VA - Linux experimental

    upload_2017-4-10_13-35-10.png

    This forum's server has had TCP Fast Open enabled for past 2.5 years now. Example - improved Speed Index and perceived visual render time due to elimination of one RTT (Round Trip Time).

    wpt-tfo-linuxtest-01.png

    versus Windows test location

    upload_2017-4-10_13-40-52.png

    compared

    wpt-tfo-linuxtest-filmstrip-01.png

    Though it maybe that Webpagetest Linux test server is less congested or more performant as from tests on other sites, Linux test Webpagetest end point tested faster for Speedinfex too.
     
    Last edited: Apr 10, 2017
  3. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    2:33 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  4. pamamolf

    pamamolf Premium Member Premium Member

    4,086
    428
    83
    May 31, 2014
    Ratings:
    +834
    Local Time:
    6:33 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    We must do that manually?

    What should we add and where?

    Also is the edit related to the power of the server and need any adjustments?
     
  5. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    2:33 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  6. tjk

    tjk Member

    76
    16
    8
    Jun 27, 2015
    Ratings:
    +27
    Local Time:
    12:33 AM
    Hey @eva2000 I just did a fresh install using betainstall7, and I don't have this directive in my virtual.conf file.

    Also, will this go back and update the file for installs that have been running the beta code for a bit, after we update the code?

    Thanks!
     
  7. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    2:33 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    there was a bug fix i just made for this a few hours ago, so if you run centmin.sh menu option 23 submenu option 2 and then recompile nginx via centmin.sh menu option 4 it should auto set it in virtual.conf
     
  8. tjk

    tjk Member

    76
    16
    8
    Jun 27, 2015
    Ratings:
    +27
    Local Time:
    12:33 AM
    Worked on new install and older install, thanks!
     
  9. rdan

    rdan Well-Known Member

    5,447
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    12:33 PM
    Mainline
    10.2
  10. rdan

    rdan Well-Known Member

    5,447
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    12:33 PM
    Mainline
    10.2
    How can I confirm it works as expected?
     
  11. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    2:33 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Also you can use wireshark inspect tcpdump of connection between linux client and linux server both enabled with TFO on either ends on system + within client browser. Look for TFO cookie in wireshark. Though from testing webpagetest.org's linux test server either doesn't have TCP Fast Open enabled on their linux server end or not enabled within Chrome linux browser they use as I am not seeing teh TFO cookie or from server side stats.
     
  12. rdan

    rdan Well-Known Member

    5,447
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    12:33 PM
    Mainline
    10.2
    Very nice result :D
    upload_2017-4-12_2-0-18.png

    upload_2017-4-12_2-1-36.png
     
  13. rdan

    rdan Well-Known Member

    5,447
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    12:33 PM
    Mainline
    10.2
    Aw still useless on Windows :/
    upload_2017-8-18_19-48-33.png
     
  14. frk7z

    frk7z New Member

    2
    1
    3
    Aug 19, 2017
    Ratings:
    +3
    Local Time:
    11:33 PM
    At least on windows, firefox nightly supports "tcp fast open" by default, stable is disabled by default due a bug, but you can activate that if you want. To check the option go to about:config and search this "network.tcp.tcp_fastopen_enable"
     
  15. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    2:33 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Yeah windows Chrome doesn't have support, Linux and Android Chrome does. I had it enabled on Android Chrome for years now without problem.