SlideShare a Scribd company logo
Optimizing Drupal Performance
Tips and Tricks
by Tim Kamanin
@timonweb
timonweb.com
mailto:timur@kamanin.com
DrupalCamp Wroclaw 2013
About me
- Freelance Drupal consultant
- Working with Drupal since 2006
- Started my journey from building own projects
on Drupal
- Share Drupal knowledge at timonweb.com
- Co-founder of Drupal Trójmiasto Users Group
(Gdańsk / Sopot / Gdynia, 3drupal.pl)
- Creator of Dropbucket.org – Drupal snippets
repository
What is Performance?
Performance refers to how long does it take to
produce a page.
It is a result of how long it takes to render a
page on the server and on the client side in the
browser.
Why do we care about it?
Performance
is
Love and Money
THE HORRIBLE
TRUTH ABOUT
DRUPAL IS
...
Photo by Chris Hoving
Drupal is
● Database intensive
● Memory intensive
● Can easily become a resource hog
Reasons why most Drupal
sites are slow:
● doing full page renders
● serving dynamic content to anonymous
users
● slow mysql queries
● module bloat aka „open buffet” syndrome
Typical Drupal Stack
Linux
CSS / JavaScript
Apache MySQL PHP
Drupal
Media
Drupal Performance
Tips and Tricks
1. Know the Tools
Devel
Developer Tools in a
browser
● Pingdom
● YSlow
● Apache benchmark
● XHProf
● top / htop
● New relic
● mytop / mtop
● PhpMyAdmin
● And lots more
Know the Tools
2. Limit number of
installed modules
3. Always check what
installed modules are doing
behind the scenes
- take advantage of caching
(drupal_static(), cache_set(),
cache_get())
- split ui part and functional part
- take advantage of Drupal's Ajax
Framework
- Use Drupal API!!!
4. Develop modules with performance
in mind:
5. Enable css / javascript
aggregation:
● built in
● aggregate cache module
6. Cache PHP
with APC
7. Export views and
Panels to code
8. Enable fast_404
9. Remeber, cache
saves the cash! Cache
everything!
10. Enable page cache
and page compression
(mod_deflate)
11. Install Boost to make
anonymous caching 100 x times
faster or play with Varnish
and make things even faster!
12. Enable views and
block caching for
authorized users
13. Consider using ESI and
authcache to cache pages for
authorized users.
WARNING: This solution is for
experienced users.
14. Store cache in
memory. Install
memcached or redis
15. Tune SQL
- find slow queries
- use indexes
- use EXPLAIN on queries
16. Tune MySQL:
Tweak my.cnf:
- query_cache_size – caches query results
(32M - 512M)
- innodb_buffer_pool_size – caches indexes.
Up to 80% of your memory
- table_cache – number of tables mysql keeps
in cache. Start with 1000
- tmp_table_size and max_heap_table_size
● StartServers - number of child server processes
created at startup (default 5)
● MinSpareServers - minimum number of idle child
server processes (default is 5)
● MaxSpareServers – maximum number of idle processes
(default is 10)
● MaxClients - maximum number of connections that will
be processed simultaneously, otherwise queued (default
256)
● KeepAlive. On / Off depending on circumstances
17. Tune Apache:
18. Separate Media and Code
● Move media to CDN
● Move media to separate
server
19. Move search from
Database to Solr search_api
+ Solr
20. Optimize, measure
and repeat!
Comments,
questions?
@timonweb
timonweb.com
mailto:timur@kamanin.com

More Related Content

ODP
Optimizing Drupal Performance (English)
PPT
Drupal caching
PPT
Drupalcamp Estonia - High Performance Sites
PPTX
Speed up with hiphop php 2014 01-22
PPT
Caching strategy and apc
PDF
Optimize drupal
PDF
Memcache and Drupal - Vaibhav Jain
PDF
High Performance Drupal
Optimizing Drupal Performance (English)
Drupal caching
Drupalcamp Estonia - High Performance Sites
Speed up with hiphop php 2014 01-22
Caching strategy and apc
Optimize drupal
Memcache and Drupal - Vaibhav Jain
High Performance Drupal

What's hot (20)

PDF
04 web optimization
PPT
High Performance Wordpress: “Faster, Cheaper, Easier : Pick Three”
PPTX
Speeding Up WordPress sites
PPTX
Wordpress optimization
PPTX
Build website using Open Source Technology
PPTX
Scaling wordpress for high traffic
PDF
Roshan Bhattarai: Scaling WordPress for high traffic sites
PPTX
Ithemes presentation
ODP
Drupal Performance and Scaling
PPTX
Wordpress customer support
PPT
High Performance Wordpress
PPTX
Scalability
PPTX
Building Scalable Web Apps - LVL.UP KL
PPTX
Squeeze Maximum Performance From Your Joomla Website
PPTX
Wordpress Website Development Services Hyderabad | Wordpress Website Develop...
PDF
EasyEngine - Command-Line tool to manage WordPress Sites on Nginx
PDF
Scaling WordPress
PPTX
Wordpress website scaling challenges
PPTX
Serve like a boss (part two)
PPTX
"Ensuring chances of theme acceptance in wordpress.org directory" on WordCamp...
04 web optimization
High Performance Wordpress: “Faster, Cheaper, Easier : Pick Three”
Speeding Up WordPress sites
Wordpress optimization
Build website using Open Source Technology
Scaling wordpress for high traffic
Roshan Bhattarai: Scaling WordPress for high traffic sites
Ithemes presentation
Drupal Performance and Scaling
Wordpress customer support
High Performance Wordpress
Scalability
Building Scalable Web Apps - LVL.UP KL
Squeeze Maximum Performance From Your Joomla Website
Wordpress Website Development Services Hyderabad | Wordpress Website Develop...
EasyEngine - Command-Line tool to manage WordPress Sites on Nginx
Scaling WordPress
Wordpress website scaling challenges
Serve like a boss (part two)
"Ensuring chances of theme acceptance in wordpress.org directory" on WordCamp...
Ad

Viewers also liked (7)

PPTX
Presentatie1
ODP
Optimizing Drupal Performance (Polish)
PPT
Ongoing Portfolio
DOC
Ashwin Kumar
PDF
PDF
PPT
Cited Reference Searching
Presentatie1
Optimizing Drupal Performance (Polish)
Ongoing Portfolio
Ashwin Kumar
Cited Reference Searching
Ad

Similar to Optimizing Drupal Performance. Tips and Tricks (20)

PDF
Drupal performance and scalability
PDF
Drupal 7 performance and optimization
PPT
Drupal Performance - SerBenfiquista.com Case Study
PPT
Performance and Scalability
PPTX
Артем Сильчук - Respond in 60ms. Extremal optimization with reinventing a wheel
PPTX
Drupal performance optimization Best Practices
PPTX
Performance Optimization in Drupal 8
PPT
Make Drupal Run Fast - increase page load speed
PPTX
Site Speed = Success – Optimising WordPress from the Server Up - Presented by...
PPTX
WordCamp Harare 2016 - Site Speed = Success
ODP
Drupal in 5mins + Previewing Drupal 8.x
ODP
Drupal 7 training
PDF
Drupal in-depth
PPTX
Drupal 8 Lessons From the Field: Part 3 - The Drupal Backend
PDF
Scaling PHP apps
PPTX
PHP Performance tuning for Drupal 8
PPTX
Improving Drupal Performances
PPTX
Drupaljdnndkdkckmfkfkkffmfkkfkfk_Part1.pptx
PPT
Drupalcamp Estonia - High Performance Sites
PDF
Escalando php e drupal- performance ao infinito e além! - DrupalCamp SP 2015
Drupal performance and scalability
Drupal 7 performance and optimization
Drupal Performance - SerBenfiquista.com Case Study
Performance and Scalability
Артем Сильчук - Respond in 60ms. Extremal optimization with reinventing a wheel
Drupal performance optimization Best Practices
Performance Optimization in Drupal 8
Make Drupal Run Fast - increase page load speed
Site Speed = Success – Optimising WordPress from the Server Up - Presented by...
WordCamp Harare 2016 - Site Speed = Success
Drupal in 5mins + Previewing Drupal 8.x
Drupal 7 training
Drupal in-depth
Drupal 8 Lessons From the Field: Part 3 - The Drupal Backend
Scaling PHP apps
PHP Performance tuning for Drupal 8
Improving Drupal Performances
Drupaljdnndkdkckmfkfkkffmfkkfkfk_Part1.pptx
Drupalcamp Estonia - High Performance Sites
Escalando php e drupal- performance ao infinito e além! - DrupalCamp SP 2015

Recently uploaded (20)

PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Electronic commerce courselecture one. Pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPT
Teaching material agriculture food technology
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Machine Learning_overview_presentation.pptx
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Approach and Philosophy of On baking technology
PPTX
MYSQL Presentation for SQL database connectivity
PDF
cuic standard and advanced reporting.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Cloud computing and distributed systems.
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Electronic commerce courselecture one. Pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Teaching material agriculture food technology
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Machine Learning_overview_presentation.pptx
A comparative analysis of optical character recognition models for extracting...
Review of recent advances in non-invasive hemoglobin estimation
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Approach and Philosophy of On baking technology
MYSQL Presentation for SQL database connectivity
cuic standard and advanced reporting.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
20250228 LYD VKU AI Blended-Learning.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Assigned Numbers - 2025 - Bluetooth® Document
Machine learning based COVID-19 study performance prediction
Cloud computing and distributed systems.
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx

Optimizing Drupal Performance. Tips and Tricks