SlideShare a Scribd company logo
1 of 64
Download to read offline
TurboPress
The High Performance Guide to WordPress
Let’s start with
 some theory.
INTERWEBS AMIRITE?
Browser     sho velling



shovelling
             Web Server
                PHP
                           shovelling

             WordPress
shovelling
              MySQL
0. The Browser
1. DNS
 “ bethesignal.org ”


  Browser                 Router   ISP DNS
“ 70 . 85 . 31 . 216 “


                                   DNS Host
1. DNS
 “ bethesignal.org ”


  Browser                10 ms    Router   160 ms
                                                    ISP DNS
“ 70 . 85 . 31 . 216 “                                  210 ms



                                                    DNS Host
1. DNS
 “ bethesignal.org ”


  Browser                10 ms    Router     160 ms
                                                      ISP DNS
“ 70 . 85 . 31 . 216 “                                    210 ms



                                                      DNS Host

                                    Google’s web performance
                                    team calculate the average
                                     DNS query takes 130ms!
2. HTTP
 “ bethesignal.org “


  Browser                     10 ms    Router   160 ms
                                                         ISP DNS
“ 70 . 85 . 31 . 216 “                                       210 ms



                                                         DNS Host
    70 . 85 . 31 . 216 : 80


   Web Ser ver
2. HTTP
 “ bethesignal.org “


  Browser                       10 ms    Router   160 ms
                                                           ISP DNS
“ 70 . 85 . 31 . 216 “                                         210 ms


                       220 ms
                                                           DNS Host
    70 . 85 . 31 . 216 : 80


   Web Ser ver
3. PHP
 “ bethesignal.org “


  Browser                       10 ms    Router   160 ms
                                                           ISP DNS
“ 70 . 85 . 31 . 216 “                                         210 ms


                       220 ms
                                                           DNS Host
    70 . 85 . 31 . 216 : 80


   Web Ser ver                             PHP
3. PHP
 “ bethesignal.org “


  Browser                       10 ms            Router   160 ms
                                                                   ISP DNS
“ 70 . 85 . 31 . 216 “                                                 210 ms


                       220 ms
                                                                   DNS Host
    70 . 85 . 31 . 216 : 80
                                        650 ms


   Web Ser ver                                     PHP
4. MySQL
 “ bethesignal.org “


  Browser                       10 ms   Router   160 ms
                                                          ISP DNS
“ 70 . 85 . 31 . 216 “                                        210 ms


                       220 ms
                                                          DNS Host
    70 . 85 . 31 . 216 : 80


   Web Ser ver                            PHP             MySQL
5. Back to the browser!
Browser     sho velling



shovelling
             Web Server
                PHP
                           shovelling

             WordPress
shovelling
              MySQL
Some gory detail…
GET / HTTP/1.1
Host: bethesignal.org
Connection: keep-alive
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.11
(KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-AU,en;q=0.8,en-US;q=0.6
Accept-Charset: UTF-8,*;q=0.5
Cookie: wordpress_logged_in_...=jdub...
If-Modified-Since: Thu, 12 Jul 2012 21:27:06 GMT

HTTP/1.1 200 OK
Server: nginx/1.2.1
Date: Fri, 20 Jul 2012 23:48:04 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
Vary: Cookie
X-Pingback: http://bethesignal.org/xmlrpc.php
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Last-Modified: Fri, 20 Jul 2012 23:48:03 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
Pragma: no-cache
Content-Encoding: gzip
10:32:16.084565   *   About to connect() to bethesignal.org port 80 (#0)
10:32:16.084768   *     Trying 70.85.31.216... TCP_NODELAY set
10:32:16.283247   *   connected
10:32:16.283376   *   Connected to bethesignal.org (70.85.31.216) port 80 (#0)
10:32:16.283528   >   GET / HTTP/1.1
10:32:16.283528   >   User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/...
10:32:16.283528   >   Host: bethesignal.org
10:32:16.283528   >   Accept: */*
10:32:16.283528   >   Accept-Encoding: deflate, gzip
10:32:16.283528   >   Cookie: wordpress_logged_in_...=jdub...
10:32:16.283528   >
10:32:16.995103   <   HTTP/1.1 200 OK
10:32:16.995216   <   Server: nginx/1.2.1
10:32:16.995240   <   Date: Sat, 21 Jul 2012 00:32:16 GMT
10:32:16.995295   <   Content-Type: text/html; charset=UTF-8
10:32:16.995374   <   Transfer-Encoding: chunked
10:32:16.995412   <   Connection: keep-alive
10:32:16.995447   <   Vary: Accept-Encoding
10:32:16.995482   <   Vary: Cookie
10:32:16.995515   <   X-Pingback: http://bethesignal.org/xmlrpc.php
10:32:16.995548   <   Expires: Wed, 11 Jan 1984 05:00:00 GMT
10:32:16.995601   <   Last-Modified: Sat, 21 Jul 2012 00:32:16 GMT
10:32:16.995642   <   Cache-Control: no-cache, must-revalidate, max-age=0
10:32:16.995680   <   Pragma: no-cache
10:32:16.995717   <   Content-Encoding: gzip
10:32:16.995759   <
10:32:16.995794   {   [data not shown]
10:32:17.393072   *   Connection #0 to host bethesignal.org left intact
10:32:17.393170   *   Closing connection #0
Now you have
some <html> …
GET /wp-content/uploads/2011/04/strange-days.jpg HTTP/1.1
Host: bethesignal.org
Connection: keep-alive
Cache-Control: no-cache
Pragma: no-cache
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.11
(KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Referer: http://bethesignal.org/
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-AU,en;q=0.8,en-US;q=0.6
Accept-Charset: UTF-8,*;q=0.5
Cookie: wordpress_logged_in_...=jdub...

HTTP/1.1 200 OK
Server: nginx/1.2.1
Date: Fri, 20 Jul 2012 23:50:50 GMT
Content-Type: image/jpeg
Content-Length: 180112
Last-Modified: Fri, 08 Apr 2011 14:25:27 GMT
Connection: keep-alive
Expires: Wed, 19 Jul 2017 23:50:50 GMT
Cache-Control: max-age=157680000
Accept-Ranges: bytes
10:34:05.051972   *   About to connect() to bethesignal.org port 80 (#0)
10:34:05.052162   *     Trying 70.85.31.216... TCP_NODELAY set
10:34:05.251898   *   connected
10:34:05.251989   *   Connected to bethesignal.org (70.85.31.216) port 80 (#0)
10:34:05.252123   >   GET /wp-content/uploads/2011/04/strange-days.jpg HTTP/1.1
10:34:05.252123   >   User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/...
10:34:05.252123   >   Host: bethesignal.org
10:34:05.252123   >   Accept: */*
10:34:05.252123   >   Accept-Encoding: deflate, gzip
10:34:05.252123   >   Cookie: wordpress_logged_in_...=jdub...
10:34:05.252123   >
10:34:05.448816   <   HTTP/1.1 200 OK
10:34:05.448981   <   Server: nginx/1.2.1
10:34:05.449045   <   Date: Sat, 21 Jul 2012 00:34:05 GMT
10:34:05.449091   <   Content-Type: image/jpeg
10:34:05.449131   <   Content-Length: 180112
10:34:05.449170   <   Last-Modified: Fri, 08 Apr 2011 14:25:27 GMT
10:34:05.449211   <   Connection: keep-alive
10:34:05.449250   <   Expires: Thu, 20 Jul 2017 00:34:05 GMT
10:34:05.449290   <   Cache-Control: max-age=157680000
10:34:05.449331   <   Accept-Ranges: bytes
10:34:05.449382   <
10:34:05.449440   {   [data not shown]
10:34:06.443613   *   Connection #0 to host bethesignal.org left intact
10:34:06.443714   *   Closing connection #0
webpagetest.org
            Sydney ADSL
webpagetest.org
            Los Angeles Fibre
webpagetest.org
            Los Angeles Fibre
The Network
Host DNS and web
services close to your
  primary audience.
(This is one reason why
 global web sites use CDNs,
particularly for static content.)
The Web Server
shovelling
               Apache
             mpm_prefork
                                                                                                  sho velling
              mod_php
shovelling
                *.php   ...
 and
 back
 again!
shovelling
               Apache
             mpm_prefork
                                                                                                  sho velling
              mod_php
shovelling
                *.png   ...
 and
 back
 again!
1 process per request

10-100MB per process
      (or more)
Right now, web
servers around the
planet are wasting
 gobs of memory
serving static files.
Try a different
process model.
You could use
mpm_worker…
MASSIVE
PHP FAIL
nginx
1 process per core

 request overhead
measured in kilobytes
shovelling
               nginx
             php-fastcgi
                                                                                                   sho velling
              [worker]
shovelling
               *.php     ...
 and
 back
 again!
nginx
shovelling

             *.png   ...
 and
 back
 again!
Apache and nginx




Netcraft Survey
 to May 2012
PHP
“There are only two hard things
  in Computing Science: cache
invalidation and naming things.”

         - Phil Karlton
It’s turtles all
the way down.
Opcode caching
Don’t let PHP do the same work twice.
APC
APC
  everywhere!
WordPress
Object caching
Don’t talk to the database if you don’t have to.
APC or memcache
wp-content/object-cache.php
Output or page caching
      Avoid PHP entirely…?
WP Super Cache
nginx
shovelling

             *.png   ...

More Related Content

Similar to TurboPress: The High Performance Guide to WordPress - Jeff Waugh - WordCamp Sydney 2012

如何使用 iframe 製作一個易於更新及更安全的前端套件
如何使用 iframe 製作一個易於更新及更安全的前端套件如何使用 iframe 製作一個易於更新及更安全的前端套件
如何使用 iframe 製作一個易於更新及更安全的前端套件Mu Chun Wang
 
PAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonPAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonNeotys
 
Altitude San Francisco 2018: HTTP/2 Tales: Discovery and Woe
Altitude San Francisco 2018: HTTP/2 Tales: Discovery and WoeAltitude San Francisco 2018: HTTP/2 Tales: Discovery and Woe
Altitude San Francisco 2018: HTTP/2 Tales: Discovery and WoeFastly
 
Pushing the web — WebSockets
Pushing the web — WebSocketsPushing the web — WebSockets
Pushing the web — WebSocketsRoland M
 
Building Lightning Fast Websites (for Twin Cities .NET User Group)
Building Lightning Fast Websites (for Twin Cities .NET User Group)Building Lightning Fast Websites (for Twin Cities .NET User Group)
Building Lightning Fast Websites (for Twin Cities .NET User Group)strommen
 
Interactive web. O rly?
Interactive web. O rly?Interactive web. O rly?
Interactive web. O rly?timbc
 
05.m3 cms list-ofwebserver
05.m3 cms list-ofwebserver05.m3 cms list-ofwebserver
05.m3 cms list-ofwebservertarensi
 
Surviving Slashdot
Surviving SlashdotSurviving Slashdot
Surviving Slashdotjohnbuckman
 
Tuning the Kernel for Varnish Cache
Tuning the Kernel for Varnish CacheTuning the Kernel for Varnish Cache
Tuning the Kernel for Varnish CachePer Buer
 
Usenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a ProxyUsenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a ProxyLeif Hedstrom
 
Restful web services with nodejs
Restful web services with nodejsRestful web services with nodejs
Restful web services with nodejsAspenware
 
DNS for Developers - ConFoo Montreal
DNS for Developers - ConFoo MontrealDNS for Developers - ConFoo Montreal
DNS for Developers - ConFoo MontrealMaarten Balliauw
 
5 things you didn't know nginx could do velocity
5 things you didn't know nginx could do   velocity5 things you didn't know nginx could do   velocity
5 things you didn't know nginx could do velocitysarahnovotny
 
Reducing latency on the web with the Azure CDN - DevSum - SWAG
Reducing latency on the web with the Azure CDN - DevSum - SWAGReducing latency on the web with the Azure CDN - DevSum - SWAG
Reducing latency on the web with the Azure CDN - DevSum - SWAGMaarten Balliauw
 
Site Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariSite Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariJoseph Scott
 
Website Analysis Report - Website Designing Proposal
Website Analysis Report - Website Designing ProposalWebsite Analysis Report - Website Designing Proposal
Website Analysis Report - Website Designing ProposalSuraj Singh
 
Silverlight Wireshark Analysis
Silverlight Wireshark AnalysisSilverlight Wireshark Analysis
Silverlight Wireshark AnalysisYoss Cohen
 

Similar to TurboPress: The High Performance Guide to WordPress - Jeff Waugh - WordCamp Sydney 2012 (20)

如何使用 iframe 製作一個易於更新及更安全的前端套件
如何使用 iframe 製作一個易於更新及更安全的前端套件如何使用 iframe 製作一個易於更新及更安全的前端套件
如何使用 iframe 製作一個易於更新及更安全的前端套件
 
PAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonPAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark Tomlinson
 
Altitude San Francisco 2018: HTTP/2 Tales: Discovery and Woe
Altitude San Francisco 2018: HTTP/2 Tales: Discovery and WoeAltitude San Francisco 2018: HTTP/2 Tales: Discovery and Woe
Altitude San Francisco 2018: HTTP/2 Tales: Discovery and Woe
 
SPDY Talk
SPDY TalkSPDY Talk
SPDY Talk
 
Pushing the web — WebSockets
Pushing the web — WebSocketsPushing the web — WebSockets
Pushing the web — WebSockets
 
computer networking
computer networkingcomputer networking
computer networking
 
Building Lightning Fast Websites (for Twin Cities .NET User Group)
Building Lightning Fast Websites (for Twin Cities .NET User Group)Building Lightning Fast Websites (for Twin Cities .NET User Group)
Building Lightning Fast Websites (for Twin Cities .NET User Group)
 
Interactive web. O rly?
Interactive web. O rly?Interactive web. O rly?
Interactive web. O rly?
 
05.m3 cms list-ofwebserver
05.m3 cms list-ofwebserver05.m3 cms list-ofwebserver
05.m3 cms list-ofwebserver
 
Surviving Slashdot
Surviving SlashdotSurviving Slashdot
Surviving Slashdot
 
Tuning the Kernel for Varnish Cache
Tuning the Kernel for Varnish CacheTuning the Kernel for Varnish Cache
Tuning the Kernel for Varnish Cache
 
Usenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a ProxyUsenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a Proxy
 
Restful web services with nodejs
Restful web services with nodejsRestful web services with nodejs
Restful web services with nodejs
 
tdc2012
tdc2012tdc2012
tdc2012
 
DNS for Developers - ConFoo Montreal
DNS for Developers - ConFoo MontrealDNS for Developers - ConFoo Montreal
DNS for Developers - ConFoo Montreal
 
5 things you didn't know nginx could do velocity
5 things you didn't know nginx could do   velocity5 things you didn't know nginx could do   velocity
5 things you didn't know nginx could do velocity
 
Reducing latency on the web with the Azure CDN - DevSum - SWAG
Reducing latency on the web with the Azure CDN - DevSum - SWAGReducing latency on the web with the Azure CDN - DevSum - SWAG
Reducing latency on the web with the Azure CDN - DevSum - SWAG
 
Site Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariSite Performance - From Pinto to Ferrari
Site Performance - From Pinto to Ferrari
 
Website Analysis Report - Website Designing Proposal
Website Analysis Report - Website Designing ProposalWebsite Analysis Report - Website Designing Proposal
Website Analysis Report - Website Designing Proposal
 
Silverlight Wireshark Analysis
Silverlight Wireshark AnalysisSilverlight Wireshark Analysis
Silverlight Wireshark Analysis
 

More from WordCamp Sydney

How To Get Paid What You’re Worth - Troy Dean - WordCamp Sydney 2012
How To Get Paid What You’re Worth - Troy Dean - WordCamp Sydney 2012How To Get Paid What You’re Worth - Troy Dean - WordCamp Sydney 2012
How To Get Paid What You’re Worth - Troy Dean - WordCamp Sydney 2012WordCamp Sydney
 
Not Just another WordPress Site Design - Phil Peet - WordCamp Sydney 2012
Not Just another WordPress Site Design - Phil Peet - WordCamp Sydney 2012Not Just another WordPress Site Design - Phil Peet - WordCamp Sydney 2012
Not Just another WordPress Site Design - Phil Peet - WordCamp Sydney 2012WordCamp Sydney
 
What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012
What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012
What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012WordCamp Sydney
 
Demystifying Custom Post Types and Taxonomies - Tracey Kemp - WordCamp Sydney...
Demystifying Custom Post Types and Taxonomies - Tracey Kemp - WordCamp Sydney...Demystifying Custom Post Types and Taxonomies - Tracey Kemp - WordCamp Sydney...
Demystifying Custom Post Types and Taxonomies - Tracey Kemp - WordCamp Sydney...WordCamp Sydney
 
Child Theming WordPress - Chris Aprea - WordCamp Sydney 2012
Child Theming WordPress - Chris Aprea - WordCamp Sydney 2012Child Theming WordPress - Chris Aprea - WordCamp Sydney 2012
Child Theming WordPress - Chris Aprea - WordCamp Sydney 2012WordCamp Sydney
 
Responsive WordPress - Jordan Gillman - WordCamp Sydney 2012
Responsive WordPress - Jordan Gillman - WordCamp Sydney 2012Responsive WordPress - Jordan Gillman - WordCamp Sydney 2012
Responsive WordPress - Jordan Gillman - WordCamp Sydney 2012WordCamp Sydney
 
The Power of Your Story Through WordPress and Social Media - Kimanzi Constabl...
The Power of Your Story Through WordPress and Social Media - Kimanzi Constabl...The Power of Your Story Through WordPress and Social Media - Kimanzi Constabl...
The Power of Your Story Through WordPress and Social Media - Kimanzi Constabl...WordCamp Sydney
 
Siloing your Site for SEO Success - Stephen Cronin - WordCamp Sydney 2012
Siloing your Site for SEO Success - Stephen Cronin - WordCamp Sydney 2012Siloing your Site for SEO Success - Stephen Cronin - WordCamp Sydney 2012
Siloing your Site for SEO Success - Stephen Cronin - WordCamp Sydney 2012WordCamp Sydney
 
Stop Hacking WordPress, Start Working with it - Charly Leetham - WordCamp Syd...
Stop Hacking WordPress, Start Working with it - Charly Leetham - WordCamp Syd...Stop Hacking WordPress, Start Working with it - Charly Leetham - WordCamp Syd...
Stop Hacking WordPress, Start Working with it - Charly Leetham - WordCamp Syd...WordCamp Sydney
 
The Plugin Spectactular - Tony Cosentino - WordCamp Sydney 2012
The Plugin Spectactular - Tony Cosentino - WordCamp Sydney 2012The Plugin Spectactular - Tony Cosentino - WordCamp Sydney 2012
The Plugin Spectactular - Tony Cosentino - WordCamp Sydney 2012WordCamp Sydney
 
Optimising SEO for WordPress - Lisa Davis - WordCamp Sydney 2012
Optimising SEO for WordPress - Lisa Davis - WordCamp Sydney 2012Optimising SEO for WordPress - Lisa Davis - WordCamp Sydney 2012
Optimising SEO for WordPress - Lisa Davis - WordCamp Sydney 2012WordCamp Sydney
 
Word to the Future - Brent Shepherd - WordCamp Sydney 2012
Word to the Future - Brent Shepherd - WordCamp Sydney 2012Word to the Future - Brent Shepherd - WordCamp Sydney 2012
Word to the Future - Brent Shepherd - WordCamp Sydney 2012WordCamp Sydney
 
Securing your WordPress Website - Vlad Lasky - WordCamp Sydney 2012
Securing your WordPress Website - Vlad Lasky - WordCamp Sydney 2012Securing your WordPress Website - Vlad Lasky - WordCamp Sydney 2012
Securing your WordPress Website - Vlad Lasky - WordCamp Sydney 2012WordCamp Sydney
 
Inclusive Design Principles for WordPress - Joe Ortenzi - WordCamp Sydney
Inclusive Design Principles for WordPress - Joe Ortenzi - WordCamp SydneyInclusive Design Principles for WordPress - Joe Ortenzi - WordCamp Sydney
Inclusive Design Principles for WordPress - Joe Ortenzi - WordCamp SydneyWordCamp Sydney
 
There's More than 1 Way to Skin a WordPress Theme - Lachlan MacPherson - Word...
There's More than 1 Way to Skin a WordPress Theme - Lachlan MacPherson - Word...There's More than 1 Way to Skin a WordPress Theme - Lachlan MacPherson - Word...
There's More than 1 Way to Skin a WordPress Theme - Lachlan MacPherson - Word...WordCamp Sydney
 
WordPress for Noobs - Wil Brown - WordCamp Sydney 2012
WordPress for Noobs - Wil Brown - WordCamp Sydney 2012WordPress for Noobs - Wil Brown - WordCamp Sydney 2012
WordPress for Noobs - Wil Brown - WordCamp Sydney 2012WordCamp Sydney
 
Getting to Grips with Firebug - Anthony Hortin - WordCamp Sydney
Getting to Grips with Firebug - Anthony Hortin - WordCamp SydneyGetting to Grips with Firebug - Anthony Hortin - WordCamp Sydney
Getting to Grips with Firebug - Anthony Hortin - WordCamp SydneyWordCamp Sydney
 

More from WordCamp Sydney (17)

How To Get Paid What You’re Worth - Troy Dean - WordCamp Sydney 2012
How To Get Paid What You’re Worth - Troy Dean - WordCamp Sydney 2012How To Get Paid What You’re Worth - Troy Dean - WordCamp Sydney 2012
How To Get Paid What You’re Worth - Troy Dean - WordCamp Sydney 2012
 
Not Just another WordPress Site Design - Phil Peet - WordCamp Sydney 2012
Not Just another WordPress Site Design - Phil Peet - WordCamp Sydney 2012Not Just another WordPress Site Design - Phil Peet - WordCamp Sydney 2012
Not Just another WordPress Site Design - Phil Peet - WordCamp Sydney 2012
 
What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012
What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012
What Multisite can do for You - Anthony Cole - WordCamp Sydney 2012
 
Demystifying Custom Post Types and Taxonomies - Tracey Kemp - WordCamp Sydney...
Demystifying Custom Post Types and Taxonomies - Tracey Kemp - WordCamp Sydney...Demystifying Custom Post Types and Taxonomies - Tracey Kemp - WordCamp Sydney...
Demystifying Custom Post Types and Taxonomies - Tracey Kemp - WordCamp Sydney...
 
Child Theming WordPress - Chris Aprea - WordCamp Sydney 2012
Child Theming WordPress - Chris Aprea - WordCamp Sydney 2012Child Theming WordPress - Chris Aprea - WordCamp Sydney 2012
Child Theming WordPress - Chris Aprea - WordCamp Sydney 2012
 
Responsive WordPress - Jordan Gillman - WordCamp Sydney 2012
Responsive WordPress - Jordan Gillman - WordCamp Sydney 2012Responsive WordPress - Jordan Gillman - WordCamp Sydney 2012
Responsive WordPress - Jordan Gillman - WordCamp Sydney 2012
 
The Power of Your Story Through WordPress and Social Media - Kimanzi Constabl...
The Power of Your Story Through WordPress and Social Media - Kimanzi Constabl...The Power of Your Story Through WordPress and Social Media - Kimanzi Constabl...
The Power of Your Story Through WordPress and Social Media - Kimanzi Constabl...
 
Siloing your Site for SEO Success - Stephen Cronin - WordCamp Sydney 2012
Siloing your Site for SEO Success - Stephen Cronin - WordCamp Sydney 2012Siloing your Site for SEO Success - Stephen Cronin - WordCamp Sydney 2012
Siloing your Site for SEO Success - Stephen Cronin - WordCamp Sydney 2012
 
Stop Hacking WordPress, Start Working with it - Charly Leetham - WordCamp Syd...
Stop Hacking WordPress, Start Working with it - Charly Leetham - WordCamp Syd...Stop Hacking WordPress, Start Working with it - Charly Leetham - WordCamp Syd...
Stop Hacking WordPress, Start Working with it - Charly Leetham - WordCamp Syd...
 
The Plugin Spectactular - Tony Cosentino - WordCamp Sydney 2012
The Plugin Spectactular - Tony Cosentino - WordCamp Sydney 2012The Plugin Spectactular - Tony Cosentino - WordCamp Sydney 2012
The Plugin Spectactular - Tony Cosentino - WordCamp Sydney 2012
 
Optimising SEO for WordPress - Lisa Davis - WordCamp Sydney 2012
Optimising SEO for WordPress - Lisa Davis - WordCamp Sydney 2012Optimising SEO for WordPress - Lisa Davis - WordCamp Sydney 2012
Optimising SEO for WordPress - Lisa Davis - WordCamp Sydney 2012
 
Word to the Future - Brent Shepherd - WordCamp Sydney 2012
Word to the Future - Brent Shepherd - WordCamp Sydney 2012Word to the Future - Brent Shepherd - WordCamp Sydney 2012
Word to the Future - Brent Shepherd - WordCamp Sydney 2012
 
Securing your WordPress Website - Vlad Lasky - WordCamp Sydney 2012
Securing your WordPress Website - Vlad Lasky - WordCamp Sydney 2012Securing your WordPress Website - Vlad Lasky - WordCamp Sydney 2012
Securing your WordPress Website - Vlad Lasky - WordCamp Sydney 2012
 
Inclusive Design Principles for WordPress - Joe Ortenzi - WordCamp Sydney
Inclusive Design Principles for WordPress - Joe Ortenzi - WordCamp SydneyInclusive Design Principles for WordPress - Joe Ortenzi - WordCamp Sydney
Inclusive Design Principles for WordPress - Joe Ortenzi - WordCamp Sydney
 
There's More than 1 Way to Skin a WordPress Theme - Lachlan MacPherson - Word...
There's More than 1 Way to Skin a WordPress Theme - Lachlan MacPherson - Word...There's More than 1 Way to Skin a WordPress Theme - Lachlan MacPherson - Word...
There's More than 1 Way to Skin a WordPress Theme - Lachlan MacPherson - Word...
 
WordPress for Noobs - Wil Brown - WordCamp Sydney 2012
WordPress for Noobs - Wil Brown - WordCamp Sydney 2012WordPress for Noobs - Wil Brown - WordCamp Sydney 2012
WordPress for Noobs - Wil Brown - WordCamp Sydney 2012
 
Getting to Grips with Firebug - Anthony Hortin - WordCamp Sydney
Getting to Grips with Firebug - Anthony Hortin - WordCamp SydneyGetting to Grips with Firebug - Anthony Hortin - WordCamp Sydney
Getting to Grips with Firebug - Anthony Hortin - WordCamp Sydney
 

Recently uploaded

costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 

Recently uploaded (20)

costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 

TurboPress: The High Performance Guide to WordPress - Jeff Waugh - WordCamp Sydney 2012

  • 1. TurboPress The High Performance Guide to WordPress
  • 2. Let’s start with some theory.
  • 4. Browser sho velling shovelling Web Server PHP shovelling WordPress shovelling MySQL
  • 6. 1. DNS “ bethesignal.org ” Browser Router ISP DNS “ 70 . 85 . 31 . 216 “ DNS Host
  • 7. 1. DNS “ bethesignal.org ” Browser 10 ms Router 160 ms ISP DNS “ 70 . 85 . 31 . 216 “ 210 ms DNS Host
  • 8. 1. DNS “ bethesignal.org ” Browser 10 ms Router 160 ms ISP DNS “ 70 . 85 . 31 . 216 “ 210 ms DNS Host Google’s web performance team calculate the average DNS query takes 130ms!
  • 9. 2. HTTP “ bethesignal.org “ Browser 10 ms Router 160 ms ISP DNS “ 70 . 85 . 31 . 216 “ 210 ms DNS Host 70 . 85 . 31 . 216 : 80 Web Ser ver
  • 10. 2. HTTP “ bethesignal.org “ Browser 10 ms Router 160 ms ISP DNS “ 70 . 85 . 31 . 216 “ 210 ms 220 ms DNS Host 70 . 85 . 31 . 216 : 80 Web Ser ver
  • 11. 3. PHP “ bethesignal.org “ Browser 10 ms Router 160 ms ISP DNS “ 70 . 85 . 31 . 216 “ 210 ms 220 ms DNS Host 70 . 85 . 31 . 216 : 80 Web Ser ver PHP
  • 12. 3. PHP “ bethesignal.org “ Browser 10 ms Router 160 ms ISP DNS “ 70 . 85 . 31 . 216 “ 210 ms 220 ms DNS Host 70 . 85 . 31 . 216 : 80 650 ms Web Ser ver PHP
  • 13. 4. MySQL “ bethesignal.org “ Browser 10 ms Router 160 ms ISP DNS “ 70 . 85 . 31 . 216 “ 210 ms 220 ms DNS Host 70 . 85 . 31 . 216 : 80 Web Ser ver PHP MySQL
  • 14. 5. Back to the browser!
  • 15. Browser sho velling shovelling Web Server PHP shovelling WordPress shovelling MySQL
  • 17. GET / HTTP/1.1 Host: bethesignal.org Connection: keep-alive User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-AU,en;q=0.8,en-US;q=0.6 Accept-Charset: UTF-8,*;q=0.5 Cookie: wordpress_logged_in_...=jdub... If-Modified-Since: Thu, 12 Jul 2012 21:27:06 GMT HTTP/1.1 200 OK Server: nginx/1.2.1 Date: Fri, 20 Jul 2012 23:48:04 GMT Content-Type: text/html; charset=UTF-8 Transfer-Encoding: chunked Connection: keep-alive Vary: Accept-Encoding Vary: Cookie X-Pingback: http://bethesignal.org/xmlrpc.php Expires: Wed, 11 Jan 1984 05:00:00 GMT Last-Modified: Fri, 20 Jul 2012 23:48:03 GMT Cache-Control: no-cache, must-revalidate, max-age=0 Pragma: no-cache Content-Encoding: gzip
  • 18. 10:32:16.084565 * About to connect() to bethesignal.org port 80 (#0) 10:32:16.084768 * Trying 70.85.31.216... TCP_NODELAY set 10:32:16.283247 * connected 10:32:16.283376 * Connected to bethesignal.org (70.85.31.216) port 80 (#0) 10:32:16.283528 > GET / HTTP/1.1 10:32:16.283528 > User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/... 10:32:16.283528 > Host: bethesignal.org 10:32:16.283528 > Accept: */* 10:32:16.283528 > Accept-Encoding: deflate, gzip 10:32:16.283528 > Cookie: wordpress_logged_in_...=jdub... 10:32:16.283528 > 10:32:16.995103 < HTTP/1.1 200 OK 10:32:16.995216 < Server: nginx/1.2.1 10:32:16.995240 < Date: Sat, 21 Jul 2012 00:32:16 GMT 10:32:16.995295 < Content-Type: text/html; charset=UTF-8 10:32:16.995374 < Transfer-Encoding: chunked 10:32:16.995412 < Connection: keep-alive 10:32:16.995447 < Vary: Accept-Encoding 10:32:16.995482 < Vary: Cookie 10:32:16.995515 < X-Pingback: http://bethesignal.org/xmlrpc.php 10:32:16.995548 < Expires: Wed, 11 Jan 1984 05:00:00 GMT 10:32:16.995601 < Last-Modified: Sat, 21 Jul 2012 00:32:16 GMT 10:32:16.995642 < Cache-Control: no-cache, must-revalidate, max-age=0 10:32:16.995680 < Pragma: no-cache 10:32:16.995717 < Content-Encoding: gzip 10:32:16.995759 < 10:32:16.995794 { [data not shown] 10:32:17.393072 * Connection #0 to host bethesignal.org left intact 10:32:17.393170 * Closing connection #0
  • 19. Now you have some <html> …
  • 20. GET /wp-content/uploads/2011/04/strange-days.jpg HTTP/1.1 Host: bethesignal.org Connection: keep-alive Cache-Control: no-cache Pragma: no-cache User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Referer: http://bethesignal.org/ Accept-Encoding: gzip,deflate,sdch Accept-Language: en-AU,en;q=0.8,en-US;q=0.6 Accept-Charset: UTF-8,*;q=0.5 Cookie: wordpress_logged_in_...=jdub... HTTP/1.1 200 OK Server: nginx/1.2.1 Date: Fri, 20 Jul 2012 23:50:50 GMT Content-Type: image/jpeg Content-Length: 180112 Last-Modified: Fri, 08 Apr 2011 14:25:27 GMT Connection: keep-alive Expires: Wed, 19 Jul 2017 23:50:50 GMT Cache-Control: max-age=157680000 Accept-Ranges: bytes
  • 21. 10:34:05.051972 * About to connect() to bethesignal.org port 80 (#0) 10:34:05.052162 * Trying 70.85.31.216... TCP_NODELAY set 10:34:05.251898 * connected 10:34:05.251989 * Connected to bethesignal.org (70.85.31.216) port 80 (#0) 10:34:05.252123 > GET /wp-content/uploads/2011/04/strange-days.jpg HTTP/1.1 10:34:05.252123 > User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/... 10:34:05.252123 > Host: bethesignal.org 10:34:05.252123 > Accept: */* 10:34:05.252123 > Accept-Encoding: deflate, gzip 10:34:05.252123 > Cookie: wordpress_logged_in_...=jdub... 10:34:05.252123 > 10:34:05.448816 < HTTP/1.1 200 OK 10:34:05.448981 < Server: nginx/1.2.1 10:34:05.449045 < Date: Sat, 21 Jul 2012 00:34:05 GMT 10:34:05.449091 < Content-Type: image/jpeg 10:34:05.449131 < Content-Length: 180112 10:34:05.449170 < Last-Modified: Fri, 08 Apr 2011 14:25:27 GMT 10:34:05.449211 < Connection: keep-alive 10:34:05.449250 < Expires: Thu, 20 Jul 2017 00:34:05 GMT 10:34:05.449290 < Cache-Control: max-age=157680000 10:34:05.449331 < Accept-Ranges: bytes 10:34:05.449382 < 10:34:05.449440 { [data not shown] 10:34:06.443613 * Connection #0 to host bethesignal.org left intact 10:34:06.443714 * Closing connection #0
  • 22. webpagetest.org Sydney ADSL
  • 23. webpagetest.org Los Angeles Fibre
  • 24. webpagetest.org Los Angeles Fibre
  • 26. Host DNS and web services close to your primary audience.
  • 27. (This is one reason why global web sites use CDNs, particularly for static content.)
  • 29. shovelling Apache mpm_prefork sho velling mod_php shovelling *.php ...
  • 30.  and
  • 33. shovelling Apache mpm_prefork sho velling mod_php shovelling *.png ...
  • 34.  and
  • 37. 1 process per request 10-100MB per process (or more)
  • 38. Right now, web servers around the planet are wasting gobs of memory serving static files.
  • 42. nginx
  • 43. 1 process per core request overhead measured in kilobytes
  • 44. shovelling nginx php-fastcgi sho velling [worker] shovelling *.php ...
  • 45.  and
  • 48. nginx shovelling *.png ...
  • 49.  and
  • 52. Apache and nginx Netcraft Survey to May 2012
  • 53. PHP
  • 54. “There are only two hard things in Computing Science: cache invalidation and naming things.” - Phil Karlton
  • 56. Opcode caching Don’t let PHP do the same work twice.
  • 57. APC
  • 60. Object caching Don’t talk to the database if you don’t have to.
  • 62. Output or page caching Avoid PHP entirely…?
  • 64. nginx shovelling *.png ...
  • 65.  and
  • 69. Reverse proxy cache, such as nginx, Varnish
  • 70. MySQL
  • 71. Query (or results) cache Don’t let MySQL do the same work twice.
  • 72. Schema, index and behavioural optimisation Don’t tell MySQL do stupid work in the first place.
  • 74. Raw performance vs. Perception of performance
  • 76.
  • 77.
  • 78.