16
Empirical Results from Page Speed and mod_pagespeed Joshua Marantz & Matthew Steele Google November 8, 2011 @jmarantz www.modpagespeed.com © 2011 Google, Inc. All rights reserved.

Empirical Results from Page Speed and mod pagespeedassets.en.oreilly.com/1/event/74/Empirical Results from Page Speed and mod_pagespeed...• Make more of the web faster: 70,000 sites

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Empirical Results from Page Speed and mod pagespeedassets.en.oreilly.com/1/event/74/Empirical Results from Page Speed and mod_pagespeed...• Make more of the web faster: 70,000 sites

Empirical Results from Page Speed and mod_pagespeed���

Joshua Marantz & Matthew Steele Google November 8, 2011

@jmarantz www.modpagespeed.com © 2011 Google, Inc. All rights reserved.

Page 2: Empirical Results from Page Speed and mod pagespeedassets.en.oreilly.com/1/event/74/Empirical Results from Page Speed and mod_pagespeed...• Make more of the web faster: 70,000 sites

2

What is mod_pagespeed?

Rewrites web sites so they load & display faster, use less bandwidth

Open-source Apache Module and C++ API

Launched November 2010, now on 70k sites

Page 3: Empirical Results from Page Speed and mod pagespeedassets.en.oreilly.com/1/event/74/Empirical Results from Page Speed and mod_pagespeed...• Make more of the web faster: 70,000 sites

3

What does mod_pagespeed do?

• Automatic Image Compression & Resizing • Minify CSS, JavaScript and HTML • Inline small images, CSS, and JavaScript • Cache Extension • CSS/Javascript Combining • Domain Mapping • Domain Sharding

Page 4: Empirical Results from Page Speed and mod pagespeedassets.en.oreilly.com/1/event/74/Empirical Results from Page Speed and mod_pagespeed...• Make more of the web faster: 70,000 sites

What do we get out of these optimizations?

Page 5: Empirical Results from Page Speed and mod pagespeedassets.en.oreilly.com/1/event/74/Empirical Results from Page Speed and mod_pagespeed...• Make more of the web faster: 70,000 sites

…or…

What can we learn about WPO from this tool?

Page 6: Empirical Results from Page Speed and mod pagespeedassets.en.oreilly.com/1/event/74/Empirical Results from Page Speed and mod_pagespeed...• Make more of the web faster: 70,000 sites

Case Study: androidacademy.com

Page 7: Empirical Results from Page Speed and mod pagespeedassets.en.oreilly.com/1/event/74/Empirical Results from Page Speed and mod_pagespeed...• Make more of the web faster: 70,000 sites

7

-5.00% 0.00% 5.00% 10.00% 15.00% 20.00% 25.00% 30.00% 35.00% 40.00% 45.00%

Convert Meta-tags to Request Headers

Inlining Images, CSS, JS

Combining CSS, JS

Optimize Images (lossless)

Optimize Images (lossy)

Minify CSS, JS, HTML

Shard Domains to 2

Extend Cache

Disable inlining

Best of all Rewriters Combined

1.5M/500k 50ms First 1.5M/500k 50ms Repeat 500k/150k 150ms First 500k/150k 150ms Repeat

Minify CSS &

IE8 Page-load Speedup Breakdown (% improvement)

Source: Google internal data

Page 8: Empirical Results from Page Speed and mod pagespeedassets.en.oreilly.com/1/event/74/Empirical Results from Page Speed and mod_pagespeed...• Make more of the web faster: 70,000 sites

12.75.6.3

Page 9: Empirical Results from Page Speed and mod pagespeedassets.en.oreilly.com/1/event/74/Empirical Results from Page Speed and mod_pagespeed...• Make more of the web faster: 70,000 sites

Look at your scatter plots

Page 10: Empirical Results from Page Speed and mod pagespeedassets.en.oreilly.com/1/event/74/Empirical Results from Page Speed and mod_pagespeed...• Make more of the web faster: 70,000 sites

Web Page Test experimental organization

Source: Google internal data

Page 11: Empirical Results from Page Speed and mod pagespeedassets.en.oreilly.com/1/event/74/Empirical Results from Page Speed and mod_pagespeed...• Make more of the web faster: 70,000 sites

• WebPageTest is amazing but is by nature a lab test

• Sites are different – not all rewrites will benefit all sites

• Rewriters combine non-linearly

• Run many iterations and look at scatter-plots

• Measuring finds opportunities for improvement

Lessons & Caveats

Page 12: Empirical Results from Page Speed and mod pagespeedassets.en.oreilly.com/1/event/74/Empirical Results from Page Speed and mod_pagespeed...• Make more of the web faster: 70,000 sites

Case Study #2: international sports site • Not running mod_pagespeed at

origin

• Site mirrored & tested with mod_pagespeed on & off

•  Image rich

• Benefits from compression & inlining

Page 13: Empirical Results from Page Speed and mod pagespeedassets.en.oreilly.com/1/event/74/Empirical Results from Page Speed and mod_pagespeed...• Make more of the web faster: 70,000 sites

IE8 Image Compression & Inlining Breakdown (% improvement)

Source: Google internal data

Page 14: Empirical Results from Page Speed and mod pagespeedassets.en.oreilly.com/1/event/74/Empirical Results from Page Speed and mod_pagespeed...• Make more of the web faster: 70,000 sites

• Site-specific optimization is time-consuming

• mod_pagespeed provides zero-effort Pretty Good Speedup

• mod_pagespeed & webpagetest can guide manual effort

Take-Away

Page 15: Empirical Results from Page Speed and mod pagespeedassets.en.oreilly.com/1/event/74/Empirical Results from Page Speed and mod_pagespeed...• Make more of the web faster: 70,000 sites

mod_pagespeed roadmap • Make more of the web faster: 70,000 sites is a start…

– High-volume partners (Hosting Providers, CDNs) – Leveraged integrations with servers, proxies, caches, etc – Extreme Support

• Make the web more fast – Tune default inlining thresholds & image compression ratios based on these results – Dynamic Threshold Tuning based on User-Agent – Deferring JavaScript execution

• Measure Better – Make it easier to reproduce these experiments for any site – Run experiments across a broader swath of the internet – Collect data from real browsers & web sites in production

Page 16: Empirical Results from Page Speed and mod pagespeedassets.en.oreilly.com/1/event/74/Empirical Results from Page Speed and mod_pagespeed...• Make more of the web faster: 70,000 sites

mod_pagespeed: Automatically Make Your Web Sites Faster

Read About it http://code.google.com/speed/page-speed/docs/module.html

Try it http://www.modpagespeed.com

Download it http://code.google.com/speed/page-speed/download.html

Discuss it http://groups.google.com/group/mod-pagespeed-discuss

Build From from source http://code.google.com/p/modpagespeed/wiki/HowToBuild

Google I/O 2011 videos http://www.youtube.com/watch?v=30_AIEhar-I

http://www.youtube.com/watch?v=hLQbsqSx6Y4