drupal performance
TRANSCRIPT
Optimize Drupal siteperformance
Kornel Lugosi (@Coornail)
Pronovix
October 18, 2011
,,Amazon found that+100ms increase inresponse time equaled -1%sales”
1
1http://htmlcssjavascript.com/web/why-front-end-performance-matters-to-everyone/
,,Google found that +500msresponse time meant a 20%reduction in searches”
2
2http://htmlcssjavascript.com/web/why-front-end-performance-matters-to-everyone/
Performance / Scaling
Performance != Scaling
Performance
Scaling
Measure
Measure
I Apache Benchmark (ab)
I Jmeter
I Firebug
Jmeter
Monitor
Monitor
I Munin
I Cacti
I Nagios
Backend
Know your parts
I Linux
I Apache (/nginx/Lighttpd)
I Mysql (/postgreSQL/sqlite)
I PHP
Webserver
I Apache
I Nginx
I lighttpd
I . . .
Nginx vs Apache
Reverse proxy foranonymous users
I Varnish
I Nginx
Varnish
Hardware
RAM.
PHP
Opcode caches:
I APC
I XCache
I Zend Optimizer
Opcode caches
Front-end
HTTP requests
I JavaScript aggregation
I CSS aggregation
I mod expires
Parralelize downloads
Use content delivery network:
I Parralel module
I CDN module
I SimpleCDN module
Compress
mod deflate
mod deflate
Utilize cache
mod expires
Keep it minimal
I Reduce DOM elements
I Reduce DNS lookups
Images
I Letting them 404 is veryexpensive in Drupal 6!
I optipng
I jpegtrans
Drupal-related
Anonymous vs Logged in
Database engines
Pressflow
I Drupal fork
I Optimized for performance
I Only supports mysql
I Supports reverse proxies(!)
I Database replication
Pressflow
Pressflow and Varnish atCEU
Drupal 6 vs Drupal 7
Performance relatedmodules
I memcached
I cache router
I boost