New mod_pagespeed Apache module to optimize performance

Thanks for the useful answer. Too bad you don't offer some service to help to configure properly a server, you seem to have a lot knowledge, and I would use it for sure. :p
The thing is there is no easy step-by-step way to do this as it largely depends on the application you're running and the available hardware resources. There is a lot of generic knowledge about optimizing mysql which you can google up anyway, but that only covers the basics - like setting memory limits, buffer sizes and such. Anything that goes beyond the basics can be very individual and you'll most likely have to figure out (through extensive testing) what's best for your site.

However, it's also important to know that the most important aspect is still the application design itself. A well designed database scheme and queries written with performance in mind will help more than any optimization you can find. A single bad query can ruin it to a point at which no optimization would ever help.
 
First off.. Hello to everyone! I work with the mod_pagespeed team at Google, just stumbled over this thread, figured it would be worth answering a few questions that came up...


^ What is described in the above thread is "PageSpeed Insights", which is our analysis tool. mod_pagespeed is an entirely different project: it optimizes your site content for you, by automatically applying the optimizations recommended by PageSpeed Insights.

With that out of the way.. Applying opcode caching, optimizing your SQL queries, etc, are all very important optimizations. Having said that, in practice, many of the bottlenecks in modern applications are in the front-end - that is to say, in loading of CSS, JavaScript, images, and so on. For example, loading this very page requires 55 requests, and consumes 850kb!

mod_pagespeed helps automate many of the best practices such as combining JS, CSS files, doing automatic image spriting, etc. In fact, one of the largest and most important optimizations is dynamic image resizing, and re-encoding: the module will resize the image to dimensions specified in the HTML, as well as re-encode png's to JPEG's, or even WebP format (30% savings over JPEG in Chrome and Opera) where applicable. As a site owner, you don't have to do anything to your content, all of this happens within the server.

With that in mind.. If you run a tight ship and pay careful attention to all of your resources - good stuff, you may not need mod_pagespeed. But, if you serve a lot of user generated content, themes, or otherwise don't have the time to keep up with all the latest browser perf techniques.. that's where mod_pagespeed can help.
 
So is anyone using this on XF yet? Benefits?

There are a couple of old (2010) XF threads about it but not much info
 
Been running with mod_pagespeed for 48 hours now.
Google Pagespeed score is 93/94 out of 100 now.
Pingdom is 85/88 of 100.

Very happy so far and still testing enabling additional filters...
 
I enabled it using the origin sub domain as they suggest:
origin.recreationalflying.com
however the next morning (today) my header, menu bar and side column wouldn't display for about 15 secs every time. I had to turn it off doing what they suggested i.e. just disabling it but it still kept hanging my site so I completely deleted the A record and now suffering the Google 404 page error until the DNS works itself out...BIG mistake
 
I enabled it using the origin sub domain as they suggest:
origin.recreationalflying.com
however the next morning (today) my header, menu bar and side column wouldn't display for about 15 secs every time. I had to turn it off doing what they suggested i.e. just disabling it but it still kept hanging my site so I completely deleted the A record and now suffering the Google 404 page error until the DNS works itself out...BIG mistake

Sounds like you tried Pagespeed Service instead of the simple Apache module. Using the Apache module was a simple 3 minute process that required no subforums or any other changes. Add Google repos, install mod pagespeed and then tell apache to load it on start. The extra tweaks and configs happen in the pagespeed.conf file and I played with those over a few days to see which ones had positive results.

@RWHP. Just google it. That's what I did and just followed the steps - I don't remember them well enough to try to tell someone else how to do this.
 
You hate reading? you want to try out mod_pagespeed? you run a ubuntu or other debian based server? Well then just follow the following steps.
  1. get the binary package based on your architecture. (to check which one run “uname -m”. If it says x86_64, they you have a 64bit server)
  2. install the package (substitute am64.deb with i386.deb if you don’t have a 64bit version)
    sudo dpkg -i mod-pagespeed-beta_current_amd64.deb
  3. open up the following file with your favorite editor
    /etc/apache2/mods-available/pagespeed.conf
  4. add all the cool features you want, i currently run this. (line 47 in the file, but it doesn’t really matter)
    ModPagespeedEnableFilters collapse_whitespace,elide_attributes
    ModPagespeedEnableFilters combine_css,rewrite_css,move_css_to_head,inline_css
    ModPagespeedEnableFilters rewrite_javascript,inline_javascript
    ModPagespeedEnableFilters rewrite_images,insert_img_dimensions
    ModPagespeedEnableFilters extend_cache
    ModPagespeedEnableFilters remove_quotes,remove_comments
  5. restart apache
    sudo service apache2 restart
  6. done.
 
On Centos

How to install mod_pagespeed?

Step1 : Determine the Linux distros and the version on the server by using the following command:
uname -a​
Step 2 : Download the latest version of mod_pagespeed from http://code.google.com/speed/page-speed/download.html
Lets consider a 64 bits CentOS Linux system for the procedure further
Step 3 : Use the following command to install it:
rpm -i mod-pagespeed-*.rpm​
Step 4 : Confirming the installed files :
rpm -ql mod-pagespeed-beta
/etc/cron.daily/mod-pagespeed
/etc/httpd/conf.d/pagespeed.conf
/usr/lib64/httpd/modules/mod_pagespeed.so
/var/www/mod_pagespeed/cache
/var/www/mod_pagespeed/files​
Step 5 : You must now restart Apache using the below command
service httpd restart​
How to Upgrade mod_pagespeed ?

Inorder to upgrade the mod_pagespeed module, you must first download the latest version and make use of the command “yum localinstall mod-pagespeed-*.rpm” for the purpose of installing http://code.google.com/speed/page-speed/download.html
Use the below commands to upgrade the package :
sudo yum update
sudo /etc/init.d/httpd restart​
 
Latest mod_pagespeed update has given us the option to use memcached instead of/along with the standard mod_pagespeed filecache. However, when I enable my memcached host : port, I lose my quick reply box and a few other css issues occur. The steps I take after enabling memcahced support are:

stop Apache
manually clear the mod_pagespeed file cache
restart memcached
start Apache

Anyone else using mod_pagespeed and memcached option with XF?
 
No, paying twice as much as you need for a server + cPanel license is just as good.
Sure, why not. If they can afford to pay the price for convenience, they might as well.

If it was just about price, everyone would go unmanaged, but they'd have to deal with every issue themselves. I know plenty of professional network admins that pay for managed or semi-managed services, including myself, just for the sake of convience.
 
What Forsaken said :P
I know enough to setup my own server, but I always use cpanel, just because it's easier (most of the time)
I'd rather click a few buttons, then delve into command line stuff.
The only time I use SSH is for database imports/exports, manually tweaking opcode caches and chmodding/deleting things in one go.
 
ahem,
The title of this thread is:
New mod_pagespeed Apache module to optimize performance


Not: Server Administration - to GUI or not to GUI?

:whistle:
 
Top Bottom