drupal performance

36
Optimize Drupal site performance Kornel Lugosi (@Coornail) Pronovix October 18, 2011

Upload: kornel-lugosi

Post on 08-May-2015

1.671 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Drupal Performance

Optimize Drupal siteperformance

Kornel Lugosi (@Coornail)

Pronovix

October 18, 2011

Page 2: Drupal Performance

,,Amazon found that+100ms increase inresponse time equaled -1%sales”

1

1http://htmlcssjavascript.com/web/why-front-end-performance-matters-to-everyone/

Page 3: Drupal Performance

,,Google found that +500msresponse time meant a 20%reduction in searches”

2

2http://htmlcssjavascript.com/web/why-front-end-performance-matters-to-everyone/

Page 4: Drupal Performance

Performance / Scaling

Performance != Scaling

Page 5: Drupal Performance

Performance

Page 6: Drupal Performance

Scaling

Page 7: Drupal Performance

Measure

Page 8: Drupal Performance

Measure

I Apache Benchmark (ab)

I Jmeter

I Firebug

Page 9: Drupal Performance

Jmeter

Page 10: Drupal Performance

Monitor

Page 11: Drupal Performance

Monitor

I Munin

I Cacti

I Nagios

Page 12: Drupal Performance

Backend

Page 13: Drupal Performance

Know your parts

I Linux

I Apache (/nginx/Lighttpd)

I Mysql (/postgreSQL/sqlite)

I PHP

Page 14: Drupal Performance

Webserver

I Apache

I Nginx

I lighttpd

I . . .

Page 15: Drupal Performance

Nginx vs Apache

Page 16: Drupal Performance

Reverse proxy foranonymous users

I Varnish

I Nginx

Page 17: Drupal Performance

Varnish

Page 18: Drupal Performance

Hardware

RAM.

Page 19: Drupal Performance

PHP

Opcode caches:

I APC

I XCache

I Zend Optimizer

Page 20: Drupal Performance

Opcode caches

Page 21: Drupal Performance

Front-end

Page 22: Drupal Performance

HTTP requests

I JavaScript aggregation

I CSS aggregation

I mod expires

Page 23: Drupal Performance

Parralelize downloads

Use content delivery network:

I Parralel module

I CDN module

I SimpleCDN module

Page 24: Drupal Performance

Compress

mod deflate

Page 25: Drupal Performance

mod deflate

Page 26: Drupal Performance

Utilize cache

mod expires

Page 27: Drupal Performance

Keep it minimal

I Reduce DOM elements

I Reduce DNS lookups

Page 28: Drupal Performance

Images

I Letting them 404 is veryexpensive in Drupal 6!

I optipng

I jpegtrans

Page 29: Drupal Performance

Drupal-related

Page 30: Drupal Performance

Anonymous vs Logged in

Page 31: Drupal Performance

Database engines

Page 32: Drupal Performance

Pressflow

I Drupal fork

I Optimized for performance

I Only supports mysql

I Supports reverse proxies(!)

I Database replication

Page 33: Drupal Performance

Pressflow

Page 34: Drupal Performance

Pressflow and Varnish atCEU

Page 35: Drupal Performance

Drupal 6 vs Drupal 7

Page 36: Drupal Performance

Performance relatedmodules

I memcached

I cache router

I boost