Get the most out of your Centmin Mod LEMP stack
Become a Member

Nginx PageSpeed Anybody here using "Hint Resource Preloading" of Pagespeed?

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by rdan, Jul 18, 2018.

  1. rdan

    rdan Well-Known Member

    4,988
    1,186
    113
    May 25, 2014
    Ratings:
    +1,808
    Local Time:
    11:24 AM
    Mainline
    10.2
    More Info: Hint Resource Preloading

    I'm testing it with webpagetest.org but got low score vs without it enabled.
     
  2. eva2000

    eva2000 Administrator Staff Member

    45,432
    10,308
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,987
    Local Time:
    1:24 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    checked source code of page to see if preload was inserted ? see limitations
     
  3. rdan

    rdan Well-Known Member

    4,988
    1,186
    113
    May 25, 2014
    Ratings:
    +1,808
    Local Time:
    11:24 AM
    Mainline
    10.2
    I can see .css/.js are added on http header.
     
  4. eva2000

    eva2000 Administrator Staff Member

    45,432
    10,308
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,987
    Local Time:
    1:24 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    got before and after webpagetest result links or waterfalls ? remember with ngx_pagespeed need a few page reloads for ngx_pagespeed to learn the make up of the page and optimize for it
     
  5. rdan

    rdan Well-Known Member

    4,988
    1,186
    113
    May 25, 2014
    Ratings:
    +1,808
    Local Time:
    11:24 AM
    Mainline
    10.2
    With pagespeed EnableFilters hint_preload_subresources;
    Document Complete Time & Fully Loaded Time is decreased by almost 1 second now :).
    After several reloads.
     
  6. rdan

    rdan Well-Known Member

    4,988
    1,186
    113
    May 25, 2014
    Ratings:
    +1,808
    Local Time:
    11:24 AM
    Mainline
    10.2
    Before:
    upload_2018-7-19_10-2-28.png


    After:
    upload_2018-7-19_10-2-46.png
     
  7. rdan

    rdan Well-Known Member

    4,988
    1,186
    113
    May 25, 2014
    Ratings:
    +1,808
    Local Time:
    11:24 AM
    Mainline
    10.2
    Downside of having ngx_pagespeed with high amount of concurrent visitors.

    20180726_192111.png

    CPU usage for Nginx alone is so high, higher than PHP-FPM.
     
  8. eva2000

    eva2000 Administrator Staff Member

    45,432
    10,308
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,987
    Local Time:
    1:24 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Price for pagespeed just like memory caching for speed uses more memory :)
     
  9. rdan

    rdan Well-Known Member

    4,988
    1,186
    113
    May 25, 2014
    Ratings:
    +1,808
    Local Time:
    11:24 AM
    Mainline
    10.2
    VS without pagespeed:
    upload_2018-8-3_2-42-44.png
     
  10. eva2000

    eva2000 Administrator Staff Member

    45,432
    10,308
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,987
    Local Time:
    1:24 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    pretty normal for ngx_pagespeed extra usage - no free lunch for page speed performance :)

    same as mysql and elasticsearch's memory usage helps with performance :D