High Performance WordPress II

B
Barry AbrahamsonSystems Wrangler at Automattic
High Performance
  WordPress II
     Fast and secure
What I LOVE About
  WordPress
About Me

• Barry Abrahamson
• Systems Wrangler, Automattic
• http://barry.wordpress.com/contact-me/
WordPress.com
WordPress.com

• Launched in August 2005
WordPress.com

• Launched in August 2005
• ~9 million blogs today
WordPress.com

• Launched in August 2005
• ~9 million blogs today
• Billions of HTTP requests per day
WordPress.com

• Launched in August 2005
• ~9 million blogs today
• Billions of HTTP requests per day
• Billions of MySQL queries per month
What is Performance?
What is Performance?

• Fast
What is Performance?

• Fast
• Scalable
What is Performance?

• Fast
• Scalable
• Secure
Lifecycle
Lifecycle

• Shared hosting ( 95% )
Lifecycle

• Shared hosting ( 95% )
• VPS (Virtual Private Server) ( < 5% )
Lifecycle

• Shared hosting ( 95% )
• VPS (Virtual Private Server) ( < 5% )
• Dedicated Server ( < 2% )
Lifecycle

• Shared hosting ( 95% )
• VPS (Virtual Private Server) ( < 5% )
• Dedicated Server ( < 2% )
• 2 Dedicated Servers ( < 1% )
Lifecycle

• Shared hosting ( 95% )
• VPS (Virtual Private Server) ( < 5% )
• Dedicated Server ( < 2% )
• 2 Dedicated Servers ( < 1% )
• > 2 Dedicated Servers ( < 1% )
Upgrade!
Shared Hosting
Shared Hosting

• FTP access (maybe SSH/SFTP)
Shared Hosting

• FTP access (maybe SSH/SFTP)
• No server management overhead
Shared Hosting

• FTP access (maybe SSH/SFTP)
• No server management overhead
• Less control and fewer options
Shared Hosting

• FTP access (maybe SSH/SFTP)
• No server management overhead
• Less control and fewer options
• Cheap! ($4 - $20/month)
Shared Hosting
Shared Hosting

• Run the latest version of WordPress (easy)
Shared Hosting

• Run the latest version of WordPress (easy)
• http://wordpress.org/hosting/
Shared Hosting

• Run the latest version of WordPress (easy)
• http://wordpress.org/hosting/
• Plugins and Themes directory - http://
  wordpress.org/extend/
Shared Hosting
Shared Hosting

• WP Super Cache
Shared Hosting

• WP Super Cache
• 25 - 50x capacity/throughput increase
Shared Hosting

• WP Super Cache
• 25 - 50x capacity/throughput increase
• Digg, Slashdot,Yahoo Buzz
VPS
VPS
• Virtual Private Server
VPS
• Virtual Private Server
• Between shared and dedicated
VPS
• Virtual Private Server
• Between shared and dedicated
• Specific resources allocated to you (good
  and bad)
VPS
• Virtual Private Server
• Between shared and dedicated
• Specific resources allocated to you (good
  and bad)
• Usually have shell “root” access
VPS
• Virtual Private Server
• Between shared and dedicated
• Specific resources allocated to you (good
  and bad)
• Usually have shell “root” access
• $20 - $50 / month
VPS
VPS
• Run the latest version of WordPress
VPS
• Run the latest version of WordPress
• WP Super Cache
VPS
• Run the latest version of WordPress
• WP Super Cache
• PHP Opcode Cache (APC)
VPS
• Run the latest version of WordPress
• WP Super Cache
• PHP Opcode Cache (APC)
• WordPress persistent object cache
VPS

• Apache alternatives
• CDN
Apache + mod_php
1 request requiring php

• Using mod_php, php
  is loaded for every
  request even if not
  needed
• Most scaling
  problems are because
  of this
VPS
VPS

• Apache alternatives
VPS

• Apache alternatives
• CDN
VPS

• Apache alternatives
• CDN
• W3 Total Cache
VPS

• Apache alternatives
• CDN
• W3 Total Cache
• MySQL tweaking ( http://
  blog.mysqltuner.com/ )
Dedicated Server
Dedicated Server

• Full control
Dedicated Server

• Full control
• Lots of responsibility
Dedicated Server

• Full control
• Lots of responsibility
• Sysadmining required
Dedicated Server

• Full control
• Lots of responsibility
• Sysadmining required
• Can be expensive ($100 - $1000 /month)
2 Servers
2 Servers
• Relatively easy to implement
2 Servers
• Relatively easy to implement
• 1 web server, 1 database server
2 Servers
• Relatively easy to implement
• 1 web server, 1 database server
• Web + database on each
2 Servers
• Relatively easy to implement
• 1 web server, 1 database server
• Web + database on each
• Isolated resources
2 Servers
• Relatively easy to implement
• 1 web server, 1 database server
• Web + database on each
• Isolated resources
• Same as single server from an application
  perspective but now you have to worry
  about network bottlenecks
Server Farm
Server Farm

• HyperDB
Server Farm

• HyperDB
• Object cache with memcached backend
Server Farm

• HyperDB
• Object cache with memcached backend
• Can’t use file-based caches anymore
Server Farm

• HyperDB
• Object cache with memcached backend
• Can’t use file-based caches anymore
• Nananana...Batcache
Server Farm
Server Farm
• Load Balancer - nginx
Server Farm
• Load Balancer - nginx
• Web Server - nginx
Server Farm
• Load Balancer - nginx
• Web Server - nginx
• PHP - php-fpm (now an official PHP
  project!)
Server Farm
• Load Balancer - nginx
• Web Server - nginx
• PHP - php-fpm (now an official PHP
  project!)
• Database - Basic MySQL replication, leave
  all the complicated stuff to HyperDB.
Server Farm
Server Farm

• High availability using spread and
  wackamole
Server Farm

• High availability using spread and
  wackamole
• Scaling from 3 to 300 is relatively easy
  compared to scaling from 2 to 3.
WordPress.com

• ~ 850 servers in 3 datacenters
• ~ 350 web servers
• ~ 300 database servers
• ~ 60 memcached servers (800GB of RAM)
Real World Numbers

• APC
 • Empty cache - 33.5 MB RAM
 • Primed cache - 6.2 MB RAM
 • 60% reduction in CPU utilization
   • 210 8-core servers on WordPress.com
Scaling Tips
Scaling Tips
• Most (all) things you do to scale WordPress
  apply to any web app
Scaling Tips
• Most (all) things you do to scale WordPress
  apply to any web app
• If your bottleneck is the database,
  something is wrong
Scaling Tips
• Most (all) things you do to scale WordPress
  apply to any web app
• If your bottleneck is the database,
  something is wrong
• Measure twice, cut once, measure again
Scaling Tips
• Most (all) things you do to scale WordPress
  apply to any web app
• If your bottleneck is the database,
  something is wrong
• Measure twice, cut once, measure again
• Don’t optimize if you don’t need to
Questions?
1 of 82

More Related Content

Similar to High Performance WordPress II

Performance outPerformance out
Performance outAndrea Martinez
96 views38 slides
Performance outPerformance out
Performance outModerator_kursa
43 views38 slides
2 72 7
2 7Oleg Petrov
178 views38 slides
Performance_Out.pptxPerformance_Out.pptx
Performance_Out.pptxsanjanabal
246 views38 slides
Performance outPerformance out
Performance outJack Huang
247 views38 slides
Performance outPerformance out
Performance outJack Huang
272 views38 slides

Similar to High Performance WordPress II(20)

Performance outPerformance out
Performance out
Andrea Martinez96 views
Performance outPerformance out
Performance out
Moderator_kursa43 views
2 72 7
2 7
Oleg Petrov178 views
Performance_Out.pptxPerformance_Out.pptx
Performance_Out.pptx
sanjanabal246 views
Performance outPerformance out
Performance out
Jack Huang247 views
Performance outPerformance out
Performance out
Jack Huang272 views
Performance outPerformance out
Performance out
Dragan Kolarevic403 views
titletitle
title
michalsap71 views
Performance outPerformance out
Performance out
Sergey Bran206 views
Performance outPerformance out
Performance out
test account156 views
Performance outPerformance out
Performance out
Jack Huang215 views
Performance outPerformance out
Performance out
Jack Huang604 views
Performance outPerformance out
Performance out
Jack Huang189 views
Performance outPerformance out
Performance out
Ramu Alagappan841 views
A Tale of 2 SystemsA Tale of 2 Systems
A Tale of 2 Systems
David Newman335 views
Scaling Social GamesScaling Social Games
Scaling Social Games
Paolo Negri1.6K views
High Performance DrupalHigh Performance Drupal
High Performance Drupal
Chapter Three2.8K views

Recently uploaded(20)

Java Platform Approach 1.0 - Picnic MeetupJava Platform Approach 1.0 - Picnic Meetup
Java Platform Approach 1.0 - Picnic Meetup
Rick Ossendrijver20 views
Liqid: Composable CXL PreviewLiqid: Composable CXL Preview
Liqid: Composable CXL Preview
CXL Forum114 views
METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...
METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...
Prity Khastgir IPR Strategic India Patent Attorney Amplify Innovation22 views
Green Leaf Consulting: Capabilities DeckGreen Leaf Consulting: Capabilities Deck
Green Leaf Consulting: Capabilities Deck
GreenLeafConsulting147 views
ChatGPT and AI for Web DevelopersChatGPT and AI for Web Developers
ChatGPT and AI for Web Developers
Maximiliano Firtman143 views
[2023] Putting the R! in R&D.pdf[2023] Putting the R! in R&D.pdf
[2023] Putting the R! in R&D.pdf
Eleanor McHugh31 views

High Performance WordPress II