39. 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
40. Requests Per Page
November 2010: 69
August 2011: 76
http://www.stevesouders.com/blog/2011/08/17/http-archive-nine-months/
43. Thinking Clearly About
Performance
http://carymillsap.blogspot.com/2010/02/thinking-
clearly-about-performance.html
44. 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
54. The Stack
HTTP PHP
Operating System
Server Hardware
Network
55. The Stack
HTTP PHP MySQL
Operating System
Server Hardware
Network
56. The Stack
WordPress
HTTP PHP MySQL
Operating System
Server Hardware
Network
57. The Stack
WordPress
HTTP PHP MySQL
Operating System
Server Hardware
Network
58. 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
59. HTTP - The Web Server
Apache - mod_pagespeed
http://code.google.com/speed/page-speed/docs/module.html
http://code.google.com/p/modpagespeed/
60. HTTP - The Web Server
Consider Alternatives
Nginx
61. HTTP - The Web Server
HTTP Compression
Keep-alive support
Correctly Configured Caching
89. 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
90. The Stack
WordPress
HTTP PHP MySQL
Operating System
Server Hardware
Network
91. 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
92. The Stack
WordPress
HTTP PHP MySQL
Operating System
Server Hardware
Network
94. 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/
95. WordPress + Memcached
Memcached Object Cache
Persistent data store for WordPress objects
Reduces the number of database queries
http://wordpress.org/extend/plugins/memcached/
100. MySQL Replication
Master / Slave
one way, asynchronous
send writes to the master
send reads to the slave
supports multiple slaves, and chaining
101. WordPress + HyperDB
Drop in replacement for default DB class
distributed reads and writes
partition data
http://wordpress.org/extend/plugins/hyperdb/