38
Best Practices for Successful Launches Launch Check Introduction

Pantheon Launch Check Introduction Webinar

Embed Size (px)

DESCRIPTION

Our launch team has helped launched tens of thousands of Drupal websites. Each time, we run the same checks. Checks for caching settings. Checks for missing modules. Checks through the watchdog logs. Necessary, but tedious. You’ll learn: - Top 4 reasons why your site could be slow - How to spot the most commonly overlooked culprits and take action to improve your site’s performance - A walk-through of what an underperforming site looks like on the Dashboard, and how to fix it through the Dashboard - Which third-party performance tools to use for popular use-case scenarios To learn more about Launch Check, see https://www.getpantheon.com/product/launchcheck

Citation preview

Page 1: Pantheon Launch Check Introduction Webinar

Best Practices for Successful Launches

Launch Check Introduction

Page 2: Pantheon Launch Check Introduction Webinar

1. Top reasons why your site could be slow2. Take action to improve your site’s performance3. What an underperforming site looks like4. Which third-party performance tools to use

What we’re covering:

Page 3: Pantheon Launch Check Introduction Webinar

Launch CheckPerformance Recommendations

Page 4: Pantheon Launch Check Introduction Webinar

Pantheon Dashboard > Site Environment > Status

Page 5: Pantheon Launch Check Introduction Webinar

Best Practices

● No multi-site● sites/all and sites/default exist● No extra files in /sites● Drupal Fast 404 pages on● sites/default/settings.php exists

Page 6: Pantheon Launch Check Introduction Webinar

Launch Check: Best practices

Page 7: Pantheon Launch Check Introduction Webinar

Drupal’s caching settings

● Anonymous page cache: enabled● Minimum cache lifetime: none● Cached page compression: off● Expiration of cached pages: 15 min+● Aggregate and compress CSS: on● Aggregate JavaScript: on

Page 8: Pantheon Launch Check Introduction Webinar

Launch Check: Drupal’s caching settings - before

Page 9: Pantheon Launch Check Introduction Webinar

● Enabled● Last run● Currently running

Drupal Cron

Page 10: Pantheon Launch Check Introduction Webinar

Launch Check: Cron

Page 11: Pantheon Launch Check Introduction Webinar

● collation - UTF8 is best● storage engine - InnoDB is optimal

Drupal Database

Page 12: Pantheon Launch Check Introduction Webinar

Launch Check: Drupal’s Database

Page 13: Pantheon Launch Check Introduction Webinar

● Count● Duplicates● Not recommended● Development● Missing

Extensions (modules & themes)

Page 14: Pantheon Launch Check Introduction Webinar

Launch Check: Extensions - before

Page 15: Pantheon Launch Check Introduction Webinar

Drupal’s System Status

Page 16: Pantheon Launch Check Introduction Webinar

Users

Page 17: Pantheon Launch Check Introduction Webinar

Views

Page 18: Pantheon Launch Check Introduction Webinar

Watchdog Database Logs

● PHP messages● Date range● Number of 404 entries● dblog status: enabled● syslog status: not enabled● Count

Page 19: Pantheon Launch Check Introduction Webinar

Launch Check: Watchdog

Page 20: Pantheon Launch Check Introduction Webinar

● Simple Drupal 7 site● Apache Bench - 10,000 requests to home

page (5 concurrent)● Warmed cache, cleared watchdog● Comparison

○ Bad config, 1 PHP notice and warning in theme○ Good config, no PHP notices or warnings

Test Configuration

Page 21: Pantheon Launch Check Introduction Webinar

Test Result

Bad config, errors● 20 min, 52 sec● Requests per

second: 7.98● Time per request:

626.192 ms

Good config, no errors● 10 min, 25 sec● Requests per

second: 15.99● Time per request:

312.780 ms

Page 22: Pantheon Launch Check Introduction Webinar

Why is my site slow?

1. Bad caching configurationa. Tune!

2. PHP errorsa. Fix them!

3. Wrong database storage enginea. Convert it!

4. Browser renderinga. Enable aggregationb. How to detect slowness?

Page 23: Pantheon Launch Check Introduction Webinar

WaterfallingRendering Optimizations

Page 24: Pantheon Launch Check Introduction Webinar

The Critical Render PathThe critical rendering path is a series of steps that need to take place in order to render a page in a browser.

Page 25: Pantheon Launch Check Introduction Webinar

Waterfall Diagram

Page 26: Pantheon Launch Check Introduction Webinar

Resource timing

● Proxy● DNS Lookup● Blocking● Connecting● Sending ● Waiting● Receiving

Page 27: Pantheon Launch Check Introduction Webinar

Minimizing Round-Trip Times

TTFB Page Size Complete Load DomContentLoad

55 1.53s 6.7kb 3.68s 3.50 2.8s

Before Aggregation of JS/CSS

Reduce the number of serial requests

Page 28: Pantheon Launch Check Introduction Webinar

TTFB Page Size Complete Load DomContentLoad

35 419ms 189kb 2.29s 2.07 1.49s

After Aggregation of JS/CSS

Page 29: Pantheon Launch Check Introduction Webinar

Minimizing Request OverheadDisable unused modules

TTFB Page Size Complete Load DomContentLoad

28 400ms 146kb 2.19s 1.8s 1.42s

Page 30: Pantheon Launch Check Introduction Webinar

Optimizing Images

PNGhttp://www.smushit.com/ysmush.it/http://www.punypng.com/https://tinypng.com/http://pngcrush.com/http://pmt.sourceforge.net/pngcrush/

JPGhttp://jpeg-optimizer.com/PhotoshopGimp

Page 31: Pantheon Launch Check Introduction Webinar
Page 32: Pantheon Launch Check Introduction Webinar

Best Practices● Minimize DNS lookups● Minimize redirects● Avoid bad requests● Combine external JavaScript● Combine external CSS● Combine images using CSS sprites● Optimize the order of styles and scripts● Avoid document.write● Avoid CSS @import● Prefer asynchronous resources● Parallelize downloads across hostnames

Page 33: Pantheon Launch Check Introduction Webinar

Optimizing Browser Rendering● Use efficient CSS selectors● Avoid CSS expressions● Put CSS in the document head● Specify image dimensions

Page 34: Pantheon Launch Check Introduction Webinar

Where to from here?

Add automation:● JS Validation● JS lint● CSS Validation● CSS lint● Grunt pagespeed

Page 35: Pantheon Launch Check Introduction Webinar

Front-end tools

● Google Pagespeed● Pingdom● YSlow● Firebug● Webpagetest.org

Page 36: Pantheon Launch Check Introduction Webinar

Set Benchmarks

● Prevent against regressions● Improve user experience● Visitor retention/acquisition

Page 37: Pantheon Launch Check Introduction Webinar

Launch Check

● Launch continuously● Deploying changes like updating themes● Catalog result

Page 38: Pantheon Launch Check Introduction Webinar

Questions?http://www.getpantheon.com/product/launchcheck