SlideShare a Scribd company logo
Screaming Fast Wordpress




Dan Collis-Puro
Berkman Center for Internet & Society
http://blogs.law.harvard.edu/djcp
djcp@cyber.law.harvard.edu
Me

●Dev/sysadmin for 12 years
●Pro linux admin 9 years

●Perl / mod_perl / postgres / mysql / ruby / rails /

php
●Mostly scrappy non-profits

●Geek-of-all-trades at Berkman (

http://cyber.law.harvard.edu)
●http://blogs.law.harvard.edu/

●Help manage many servers and

apps
Goals

●Use minimum resources to fulfill requests
●Survive the slashdot/digg effect

●Unobtrusive

●Easy to tune

●Optimize for different platforms / audiences

●If you hit the app server, you've failed

●If you MUST hit the app server, do

what's reasonable to minimize
resources
MLAPW



●MySQL
●Linux

●Apache

●PHP

●Wordpress
MySQL

●Optimize tables (with mysqlcheck and a cron job)
●Bump up query cache

●Tune key buffers

●mysqltuner.pl / tuning-primer.sh

●Might want more indexes, depending

●mytop

●Slow query log

●(meh) Clean out options table

●(meh) Clean out revisions / old spam

●(plugin) debug-queries
Linux



●RAM
●Never use swap

●Fast disk, database on its own spindles

●Fast network

●stat() kills you on network filesystems
Apache


●Use a reverse proxy
●Keepalive on frontend, no keepalive on backend

●Enable mod_deflate

●Set a sane MaxClients setting

●Use a lighter-weight frontend server – nginx!

●Use frontend proxy caching

●apachetop
PHP



●Enable opcode cache
●Make sure you allocate enough

shared RAM
●Consider not allowing stat()s
Good / bad apc
Good          Bad
Wordpress


●Two major audiences: logged in and not.
●WP-SuperCache, W3 Total Cache

●Memcached is not a panacea.

●Nor is the WP object cache.

●Disable unused plugins

●CDN for media delivery
Our Problem


●750+ live blogs, some heavily trafficked and quite
large
●Not too many simulateously auth'd users

●MANY spiders. Freakin' spiders!

●Mini-DDOSs each week

●ENORMOUS corpus of URLs to cache

●RSS feeds don't use feedburner
Our Solution

●nginx as a caching front-end proxy
●No plugins

●4 lines of code to the wordpress core

●Very flexible caching rules

●Able to cache for both audiences (sorta)

●Able to cache EVERYTHING. Period.

●Handles gzipping and logging

●Able to kill bad 'bots
Results

●Almost NO problems since implementation
●Atom feed from 6/sec to 2500/sec (network test)

●Atom feed from 3.95/sec to ~7000/sec (local test)

(apache 3500 / sec)
●DOUBLED network throughput (?)

●Halved memory requirements

●Able to rip out all wordpress-level

customizations and plugins.
Except one.
Screaming Fast Wpmu
Random Tools

●ab + bash
●firebug

●yslow

●Siege

●htop

●apachetop

●mysqltop

●EXPLAIN select
Photo credits:
Characters:
http://www.flickr.com/photos/goopymart

Background:
http://www.flickr.com/photos/roll_initiative

I ♣ you! Get in touch:
http://blogs.law.harvard.edu/djcp
djcp on the twitterz
djcp@cyber.law.harvard.edu
dan@collispuro.com
http://delicious.com/djcp - more specifically:
http://delicious.com/djcp/screamingfastwp

More Related Content

PDF
Cache hcm-topdev
PPTX
Nginx [engine x] and you (and WordPress)
PDF
2013 - Brian Stanley - Memcached, Cached all the things
PDF
Apache2 BootCamp : Apache and The Web (1.1)
PDF
High-performance high-availability Plone
PDF
Zingme practice for building scalable website with PHP
PDF
Web Performance Part 3 "Server-side tips"
PDF
IoT and developer chances
Cache hcm-topdev
Nginx [engine x] and you (and WordPress)
2013 - Brian Stanley - Memcached, Cached all the things
Apache2 BootCamp : Apache and The Web (1.1)
High-performance high-availability Plone
Zingme practice for building scalable website with PHP
Web Performance Part 3 "Server-side tips"
IoT and developer chances

What's hot (20)

PDF
Design a scalable site: Problem and solutions
PDF
StripeEu Twistedbytes Presentation
PDF
Opensource pnp container based waf
PDF
Webinar slides: Become a MongoDB DBA - What to Monitor (if you’re really a My...
PDF
Massively Scaled High Performance Web Services with PHP
PPT
5 things MySql
PDF
02 vng thanhnt-speedup_ntvv2_by_ph_pextmodule_
PDF
From One to a Cluster
PDF
Drush for humans - SANDcamp 2013
PDF
Modules and artifacts in NPM by Anton Cherednikov
PDF
Integrating Node.js with PHP
PDF
Work WIth Redis and Perl
PPTX
PHP and node.js Together
PDF
Wordpress -> Middleman: Lesson learned in the 2-years since migrating
PDF
Phorum MySQL tricks
PPTX
Anton Cherednikov "Modules and Artifacts in NPM"
PDF
Scaling php - Intercon php
PDF
Introducción a Nginx y PHP FPM
PPTX
Rust programming-language
PDF
Secret Management Journey - Here Be Dragons aka Secret Dragons
Design a scalable site: Problem and solutions
StripeEu Twistedbytes Presentation
Opensource pnp container based waf
Webinar slides: Become a MongoDB DBA - What to Monitor (if you’re really a My...
Massively Scaled High Performance Web Services with PHP
5 things MySql
02 vng thanhnt-speedup_ntvv2_by_ph_pextmodule_
From One to a Cluster
Drush for humans - SANDcamp 2013
Modules and artifacts in NPM by Anton Cherednikov
Integrating Node.js with PHP
Work WIth Redis and Perl
PHP and node.js Together
Wordpress -> Middleman: Lesson learned in the 2-years since migrating
Phorum MySQL tricks
Anton Cherednikov "Modules and Artifacts in NPM"
Scaling php - Intercon php
Introducción a Nginx y PHP FPM
Rust programming-language
Secret Management Journey - Here Be Dragons aka Secret Dragons
Ad

Similar to Screaming Fast Wpmu (20)

ODP
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
PDF
Scalable Architecture 101
PDF
The Accidental DBA
ODP
Drupal Performance and Scaling
PDF
MongoDB: Advantages of an Open Source NoSQL Database
PDF
Gdb basics for my sql db as (percona live europe 2019)
PDF
kranonit S06E01 Игорь Цинько: High load
PDF
Creating a Mature Puppet System
PDF
Creating a mature puppet system
PDF
NODE JS OC Meetup 1
PDF
Modernize Your Drupal Development
PDF
Drupal 7 performance and optimization
PPT
Linux Memory Basics for SysAdmins - ChinaNetCloud Training
PDF
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
PDF
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
PDF
UKOUG 2011: Practical MySQL Tuning
PDF
MySQL High Availability Sprint: Launch the Pacemaker
PPTX
Redis Developers Day 2014 - Redis Labs Talks
ODP
Real-world Experiences in Scala
PDF
Node.js Presentation
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Scalable Architecture 101
The Accidental DBA
Drupal Performance and Scaling
MongoDB: Advantages of an Open Source NoSQL Database
Gdb basics for my sql db as (percona live europe 2019)
kranonit S06E01 Игорь Цинько: High load
Creating a Mature Puppet System
Creating a mature puppet system
NODE JS OC Meetup 1
Modernize Your Drupal Development
Drupal 7 performance and optimization
Linux Memory Basics for SysAdmins - ChinaNetCloud Training
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
UKOUG 2011: Practical MySQL Tuning
MySQL High Availability Sprint: Launch the Pacemaker
Redis Developers Day 2014 - Redis Labs Talks
Real-world Experiences in Scala
Node.js Presentation
Ad

Recently uploaded (20)

PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
A comparative study of natural language inference in Swahili using monolingua...
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Getting Started with Data Integration: FME Form 101
PPTX
TLE Review Electricity (Electricity).pptx
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
A Presentation on Touch Screen Technology
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
Hybrid model detection and classification of lung cancer
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Approach and Philosophy of On baking technology
PPTX
Tartificialntelligence_presentation.pptx
PDF
Enhancing emotion recognition model for a student engagement use case through...
Univ-Connecticut-ChatGPT-Presentaion.pdf
Assigned Numbers - 2025 - Bluetooth® Document
A comparative study of natural language inference in Swahili using monolingua...
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
MIND Revenue Release Quarter 2 2025 Press Release
Getting Started with Data Integration: FME Form 101
TLE Review Electricity (Electricity).pptx
gpt5_lecture_notes_comprehensive_20250812015547.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
A Presentation on Touch Screen Technology
cloud_computing_Infrastucture_as_cloud_p
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
Hybrid model detection and classification of lung cancer
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
Group 1 Presentation -Planning and Decision Making .pptx
Web App vs Mobile App What Should You Build First.pdf
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Approach and Philosophy of On baking technology
Tartificialntelligence_presentation.pptx
Enhancing emotion recognition model for a student engagement use case through...

Screaming Fast Wpmu

  • 1. Screaming Fast Wordpress Dan Collis-Puro Berkman Center for Internet & Society http://blogs.law.harvard.edu/djcp [email protected]
  • 2. Me ●Dev/sysadmin for 12 years ●Pro linux admin 9 years ●Perl / mod_perl / postgres / mysql / ruby / rails / php ●Mostly scrappy non-profits ●Geek-of-all-trades at Berkman ( http://cyber.law.harvard.edu) ●http://blogs.law.harvard.edu/ ●Help manage many servers and apps
  • 3. Goals ●Use minimum resources to fulfill requests ●Survive the slashdot/digg effect ●Unobtrusive ●Easy to tune ●Optimize for different platforms / audiences ●If you hit the app server, you've failed ●If you MUST hit the app server, do what's reasonable to minimize resources
  • 5. MySQL ●Optimize tables (with mysqlcheck and a cron job) ●Bump up query cache ●Tune key buffers ●mysqltuner.pl / tuning-primer.sh ●Might want more indexes, depending ●mytop ●Slow query log ●(meh) Clean out options table ●(meh) Clean out revisions / old spam ●(plugin) debug-queries
  • 6. Linux ●RAM ●Never use swap ●Fast disk, database on its own spindles ●Fast network ●stat() kills you on network filesystems
  • 7. Apache ●Use a reverse proxy ●Keepalive on frontend, no keepalive on backend ●Enable mod_deflate ●Set a sane MaxClients setting ●Use a lighter-weight frontend server – nginx! ●Use frontend proxy caching ●apachetop
  • 8. PHP ●Enable opcode cache ●Make sure you allocate enough shared RAM ●Consider not allowing stat()s
  • 9. Good / bad apc Good Bad
  • 10. Wordpress ●Two major audiences: logged in and not. ●WP-SuperCache, W3 Total Cache ●Memcached is not a panacea. ●Nor is the WP object cache. ●Disable unused plugins ●CDN for media delivery
  • 11. Our Problem ●750+ live blogs, some heavily trafficked and quite large ●Not too many simulateously auth'd users ●MANY spiders. Freakin' spiders! ●Mini-DDOSs each week ●ENORMOUS corpus of URLs to cache ●RSS feeds don't use feedburner
  • 12. Our Solution ●nginx as a caching front-end proxy ●No plugins ●4 lines of code to the wordpress core ●Very flexible caching rules ●Able to cache for both audiences (sorta) ●Able to cache EVERYTHING. Period. ●Handles gzipping and logging ●Able to kill bad 'bots
  • 13. Results ●Almost NO problems since implementation ●Atom feed from 6/sec to 2500/sec (network test) ●Atom feed from 3.95/sec to ~7000/sec (local test) (apache 3500 / sec) ●DOUBLED network throughput (?) ●Halved memory requirements ●Able to rip out all wordpress-level customizations and plugins. Except one.
  • 15. Random Tools ●ab + bash ●firebug ●yslow ●Siege ●htop ●apachetop ●mysqltop ●EXPLAIN select
  • 16. Photo credits: Characters: http://www.flickr.com/photos/goopymart Background: http://www.flickr.com/photos/roll_initiative I ♣ you! Get in touch: http://blogs.law.harvard.edu/djcp djcp on the twitterz [email protected] [email protected] http://delicious.com/djcp - more specifically: http://delicious.com/djcp/screamingfastwp