Google’s mod_pagespeed is an open source Apache module that automatically applies best practice performance rules to web pages and their associated objects. Mod_pagespeed has more than 40 available optimization filters, including image optimization, CSS and JavaScript concatenation, minification, caching, sharding, deferring JavaScript and more. While mod_pagespeed won’t solve all performance problems, it will trim the fat from unminified text files and graphics, and reduce HTTP requests. This article tests the effect of mod_pagespeed on an example site.
Upgrading Hosting Not Enough
In our last speed tweak we upgraded the hosting of a test site. The first byte time was reduced significantly for both DSL and cable, and cable load time improved by 34.3%. However, DSL load times remained unchanged after the hosting upgrade. 20 second load times are unacceptable at DSL speeds. 3.4MB and 76 requests is clearly too large and complex a page to load fast. Clearly the page size and complexity need to be reduced.
mod_pagespeed to the rescue
To reduce the footprint of our test web page, we installed mod_pagespeed on the new server. The results are shown in Figures 1 and 2.
Performance Improvement from mod_pagespeed
After installing mod_pagespeed the page size decreased by 35.9% (from 3,487K to 2,235K), and the number of objects decreased by 19.7% (from 76 to 61 objects) (see Figure 3).
Start Render Improvement
Start render times improved accordingly, by 42.8% for DSL (from 4.9S to 2.8S) and by 16.7% for cable connections (see Figure 4).
Load Time Improvement
Load times also improved, by 33.9% for DSL (from 20.6S to 13.5S) and by 31.8% (from 6.6S to 4.5S) for cable connections (see Figure 5).
Conclusion
Installing mod_pagespeed made significant improvements in web page performance. Web page start render times improved by 17% to 43% and load times improved by about one-third. However, even after installing mod_pagespeed the load times of 13.6S for DSL and 4.5S for cable are still above HCI guidelines. So while installing mod_pagespeed can significantly improve load times, it is no substitute for manual performance optimization.
Further Reading
- Automatically Speed Up Your Site with mod_pagespeed for Apache
- mod_pagespeed is an open-source Apache module that automatically speeds up web sites. Through a number of filters, mod_pagespeed trims the fat off your HTML, CSS, JavaScript and images, reduces HTTP requests, and improves caching. In this article we introduce mod_pagespeed and summarize the available filters.
- Use a Website Accelerator
- Automated website acceleration products can speed up your site without developer intervention. We test the effectiveness of Radware’s Fastview appliance on a test site and find significant improvements in speed.