Learn about Centmin Mod LEMP Stack today
Register Now

Nginx PageSpeed Benefits of ngx_pagespeed ?

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

  1. pamamolf

    pamamolf Well-Known Member

    2,725
    243
    63
    May 31, 2014
    Ratings:
    +434
    Local Time:
    9:03 AM
    Nginx-1.13.x
    MariaDB 10.1.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

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    4:03 PM
    Nginx 1.13.x
    MariaDB 5.5
    @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

    179
    70
    28
    May 28, 2014
    Ratings:
    +100
    Local Time:
    1:03 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

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    4:03 PM
    Nginx 1.13.x
    MariaDB 5.5
    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

    179
    70
    28
    May 28, 2014
    Ratings:
    +100
    Local Time:
    1:03 AM
    1.11.x
    10.1.18
    On my forum.
     
  6. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    4:03 PM
    Nginx 1.13.x
    MariaDB 5.5
    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 Well-Known Member

    2,725
    243
    63
    May 31, 2014
    Ratings:
    +434
    Local Time:
    9:03 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    How can i disable it if it is already install?
     
  8. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    2:03 PM
    1.11
    10.2
    pscontrol off.
     
  9. pamamolf

    pamamolf Well-Known Member

    2,725
    243
    63
    May 31, 2014
    Ratings:
    +434
    Local Time:
    9:03 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    "pscontrol off."

    Confused :(

    What do you mean?
     
  10. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    4:03 PM
    Nginx 1.13.x
    MariaDB 5.5
    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
     
    • Like Like x 1
  11. KeVo

    KeVo Active Member

    179
    70
    28
    May 28, 2014
    Ratings:
    +100
    Local Time:
    1:03 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.

    :)