SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 30 day free trial to unlock unlimited reading.
33.
The Initial Request
Get the source
for the page
34.
The Initial Request
Get the source
0.113 seconds
for the page
35.
The Initial Request
DNS Lookup: 5 ms
Initial Connection: 47 ms
Time to First Byte: 57 ms
Content Download: 4 ms
Bytes In (downloaded): 9.6 KB
Bytes Out (uploaded): 0.4 KB
36.
Requests Per Page
November 2010: 69
August 2011: 76
http://www.stevesouders.com/blog/2011/08/17/http-archive-nine-months/
37.
Thinking Clearly About
Performance
http://carymillsap.blogspot.com/2010/02/thinking-
clearly-about-performance.html
38.
Average Lies
List A List B
0.924 0.796
0.928 0.798
0.954 0.802
0.957 0.823
0.961 0.919
0.965 0.977
0.972 1.076
0.979 1.216
0.987 1.273
1.373 1.320
pg3, Exhibit 1
45.
The Stack
Operating System
Server Hardware
Network
46.
The Stack
HTTP
Operating System
Server Hardware
Network
47.
The Stack
HTTP PHP
Operating System
Server Hardware
Network
48.
The Stack
HTTP PHP MySQL
Operating System
Server Hardware
Network
49.
The Stack
WordPress
HTTP PHP MySQL
Operating System
Server Hardware
Network
50.
The Stack
WordPress
HTTP PHP MySQL
Operating System
Server Hardware
Network
51.
HTTP - The Web Server
Apache
remove any modules you aren’t using
turn off host name lookups
turn off FollowSymLinks
turn off .htaccess (if you can)
turn on compression (mod_deflate)
tweak MaxClients
52.
HTTP - The Web Server
Apache - mod_pagespeed
http://code.google.com/speed/page-speed/docs/module.html
http://code.google.com/p/modpagespeed/
53.
HTTP - The Web Server
Consider Alternatives
Nginx
54.
HTTP - The Web Server
HTTP Compression
Keep-alive support
Correctly Configured Caching
55.
ETag Survey
HTTP/1.1 200 OK
ETag: "cd7ac991ff11"
56.
ETag Survey
If-None-Match: "cd7ac991ff11"
HTTP/1.1 304 NOT MODIFIED
57.
ETag Survey
ETags used by 136 of the top
1,000 U.S. sites
http://josephscott.org/archives/2011/09/etag-survey/
58.
ETag Survey
Of the 136 sites using ETags:
54 Worked Correctly (39.7%)
11 Sort of Worked (8%)
71 Broken/Useless (52.2%)
82.
PHP
use an opcode cache (APC)
use newer versions
don’t use on static files (unless you really need to)
consider output buffering
be careful with preg_* functions
profile your running code (Xdebug, VLD)
don’t re-invent native PHP functions, they are likely
faster than yours
83.
The Stack
WordPress
HTTP PHP MySQL
Operating System
Server Hardware
Network
84.
MySQL
use InnoDB table type (unless you have a
really good reason not to)
use the slow query log
use EXPLAIN on queries, learn
what the output means
double triple check your indexes
learn about quirks
85.
The Stack
WordPress
HTTP PHP MySQL
Operating System
Server Hardware
Network
86.
Memcached
“Free & open source, high-performance,
distributed memory object caching
system”
in memory only, won’t survive a reboot
key/value data store
http://memcached.org/
87.
WordPress + Memcached
Memcached Object Cache
Persistent data store for WordPress objects
Reduces the number of database queries
http://wordpress.org/extend/plugins/memcached/
92.
MySQL Replication
Master / Slave
one way, asynchronous
send writes to the master
send reads to the slave
supports multiple slaves, and chaining
93.
WordPress + HyperDB
Drop in replacement for default DB class
distributed reads and writes
partition data
http://wordpress.org/extend/plugins/hyperdb/