Discover Centmin Mod today
Register Now

Nginx PageSpeed Benefits of ngx_pagespeed ?

Discussion in 'Centmin Mod Insights' started by pamamolf, Jun 30, 2014.

  1. pamamolf

    pamamolf Premium Member Premium Member

    4,068
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    4:42 PM
    Nginx-1.25.x
    MariaDB 10.3.x
    Is Nginx_pagespeed faster in all cases forums,blogs, and does it really speed things so i can use it to my default installation?


    Thanks
     
  2. eva2000

    eva2000 Administrator Staff Member

    53,178
    12,112
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,647
    Local Time:
    11:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    @pamamolf

    ngx_pagespeed speeds up page loading speed is some cases but there's no free lunch, there's server resource overhead in speeding up page loads in terms of cpu, memory and disk increase usage. This page speed up can come at the cost of higher scalability/throughput for standalone servers (you could scale horizontally with a bit more work configuration wise but not something provided with Centmin Mod out of the box).

    But ngx_pagespeed's benefits are web app specific -so if your web app is very optimised and employs all Google PageSpeed and Yahoo YSlow page speed optimisation recommendations, then you won't have as much benefit and can disable ngx_pagespeed via NGINX_PAGESPEED=n.

    For more on Centmin Mod and ngx_pagespeed read http://centminmod.com/nginx_ngx_pagespeed.html
     
  3. KeVo

    KeVo Active Member

    180
    71
    28
    May 28, 2014
    Ratings:
    +101
    Local Time:
    8:42 AM
    1.11.x
    10.1.18
    @eva2000, does pagespeed cache images? I am noticing that whenever I attempt to change my user profile cover that the old image remains, and the same goes for my banner as well.

    I noticed in the link when I go to the images directly, it has pagespeed in it and was wondering about this.
     
  4. eva2000

    eva2000 Administrator Staff Member

    53,178
    12,112
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,647
    Local Time:
    11:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Yes it's cached but a browser hard refresh should clear it but i think pagespeed is smart enough to detect changes eventually too if you configure ngx_pagespeed correctly.

    Is this problem on this forum ? or your own site ?

    Code:
    curl -I https://community.centminmod.com/data/avatars/m/0/96x96x15.jpg,q1403917891.pagespeed.ic.8OrQHmxDkn.webp
    HTTP/1.1 200 OK
    Server: nginx centminmod
    Content-Type: image/webp
    Connection: keep-alive
    Date: Sun, 29 Jun 2014 12:46:40 GMT
    Expires: Mon, 29 Jun 2015 12:46:40 GMT
    Cache-Control: max-age=31536000
    ETag: W/"0"
    Last-Modified: Sun, 29 Jun 2014 12:46:40 GMT
    X-Page-Speed: 1.8.31.4-4009
     
  5. KeVo

    KeVo Active Member

    180
    71
    28
    May 28, 2014
    Ratings:
    +101
    Local Time:
    8:42 AM
    1.11.x
    10.1.18
    On my forum.
     
  6. eva2000

    eva2000 Administrator Staff Member

    53,178
    12,112
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,647
    Local Time:
    11:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    does it happen on this forum ? if not then it's your pagespeed.conf

    should really happen at all unless your non-cached non-pagespeed version has a very long cache control/expires time too

    see https://developers.google.com/speed/pagespeed/module/filter-cache-extend

     
    Last edited: Jun 30, 2014
  7. pamamolf

    pamamolf Premium Member Premium Member

    4,068
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    4:42 PM
    Nginx-1.25.x
    MariaDB 10.3.x
    How can i disable it if it is already install?
     
  8. rdan

    rdan Well-Known Member

    5,439
    1,397
    113
    May 25, 2014
    Ratings:
    +2,186
    Local Time:
    9:42 PM
    Mainline
    10.2
    pscontrol off.
     
  9. pamamolf

    pamamolf Premium Member Premium Member

    4,068
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    4:42 PM
    Nginx-1.25.x
    MariaDB 10.3.x
    "pscontrol off."

    Confused :(

    What do you mean?
     
  10. eva2000

    eva2000 Administrator Staff Member

    53,178
    12,112
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,647
    Local Time:
    11:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    read fully http://centminmod.com/nginx_ngx_pagespeed.html

    ngx_pagespeed is disabled by default even if installed/compiled into Nginx

    to enable ngx_pagespeed while it is compiled into Nginx use pscontrol shortcuts outlined at http://centminmod.com/nginx_ngx_pagespeed.html#intro and in pagespeed config files section at http://centminmod.com/nginx_ngx_pagespeed.html#configfiles

    typing in SSH the command pscontrol on enables it

    Code:
    pscontrol
    pscontrol admin
    pscontrol handler
    pscontrol edit
    pscontrol on
    pscontrol off
    pscontrol statson
    pscontrol statsoff
     
  11. KeVo

    KeVo Active Member

    180
    71
    28
    May 28, 2014
    Ratings:
    +101
    Local Time:
    8:42 AM
    1.11.x
    10.1.18
    He means to type in "pscontrol off" after you SSH into your server with the user you are logging in with. This will shut it down.

    :)