Automating Web Performance: Mod_pagespeed Case Study


Yesterday Google announced the out of beta for mod_pagespeed and this is a great news for people like me (sick for web performance).

I strongly invite you to read also this post by Ilya Grigorik and listen to the following video that explains what happens behind the scenes at a glance.

Let’s run Mod_pagespeed on a not optimized website

The website that we used is pallamanoitalia.it and we split the test in:

  1. Home page test
  2. Article page test

and the metodology is:

  1. not optimized
  2. softly optimized (using standard mod_pagespeed filters)
  3. hardly optimized (adding the mod_pagespeed majority of filters)

Home page web performance automation test

1.1 Not optimized home page

In the following image we can see how the page behaves without any optimization

home pre mod pagespeed

and here the waterfall detail

home pre mod pagespeed waterfall

1.2 Softly optimized home page

Now I enabled mod_pagespeed using the CoreFilters and so let’s see what is going on

home post mod pagespeed soft

and here the waterfall detail

home post mod pagespeed soft waterfall

1.3 Hardly optimized home page

In the following test I switched from CoreFilters to ModPagespeedRewriteLevel PassThrough enabling lots of filters including between the others convert_jpeg_to_progressive, convert_png_to_jpeg, convert_jpeg_to_webp, insert_image_dimensions, inline_images, recompress_images, resize_images, inline_preview_images, resize_mobile_images, lazyload_images and defer_javascript.

I want to let you know that I didn’t make any tuning of the module and I simply enabled it with some filters.

So what’s up? Take a look.

home post mod pagespeed hard

and here the waterfall detail

home post mod pagespeed hard waterfall

Results

Do you see any difference? Here is a table of them:
# Load time 1st byte Start render Request Bytes
1.1 Not optimized 8.622s 3.377s 5.429s 94 787Kb
1.2 Softly optimized 6.383s 1.525s 3.465s 93 781Kb
1.3 Hardly optimized 3.044s 1.401s 1.976s 23 255Kb

 

Article page web performance automation test

2.1 Not optimized article page

single pre mod pagespeed

single pre mod pagespeed waterfall

2.2 Softly optimized article page

single post mod pagespeed soft

single post mod pagespeed soft waterfall

2.3 Hardly optimized article page

single post mod pagespeed hard

single post mod pagespeed hard waterfall

Results

Do you see any difference? Here is a table of them:
# Load time 1st byte Start render Request Bytes
2.1 Not optimized 7.212s 1.338s 3.129s 81 666Kb
2.2 Softly optimized 6.400s 1.013s 2.405s 80 689Kb
2.3 Hardly optimized 3.173s 1.361s 1.845s 37 253Kb

A really impressive result

The mod_pagespeed Apache module behaves really well in the automation of web performance optimization and without any particular side effect. That’s a great news for lots of website owners that are not able or skilled enough to optimize manually their frontend. This module can improve considerably the speed of the entire world wide web ecosystem with a minimal effort.

There are also other services that automate the optimization like the Cloudflare Optimizer that I use in some under production sites with good results.

Automating Web Performance Optimization or Not?

I think that automating is a very powerfull way of doing repetitive stuffs or in certain case to solve in a smart way difficult architectural problems that sometimes are impossible to know looking at an external point of view, but if you are able to start from scratch and design your web app in a perfect way (caring about web performance and following all the best practices), manual optimization should always be your first choice.

Manual optimization doesn’t prevent the use of the automated one and viceversa…so I think that there is no question at all.

Real User Monitoring coming soon

In the next few days I’ll let you know if the user perceived speed will improve and I’ll share the results with you. Stay tuned!

The speed up to now.

overview speed

 

overview speed 2

After 1 day of mod_pagespeed

mod_pagespeed day 1

After 2 days of mod_pagespeed (and fixed an issue with combining)

mod_pagespeed day 2

A week of mod_pagespeed

mod pagespeed week

Some useful resources for web performance monitoring, testing and automation

Scritto il , ultima modifica


Sei membro del forum? Vuoi scrivere anche tu su LOGOALT
Chiedilo a @giorgiotave