SlideShare a Scribd company logo
puerto:22
WORDPRESS
PERFORMANCE TUNING
Javier Arturo Rodríguez
@codehead
javier.rodriguez@puerto22.com
puerto:22
ABOUT ME
• Certified System Administrator
• Certified Software Architect
• WordPress enthusiast
• CTO at puerto22.com
@codeheadjavier.rodriguez@puerto22.com
puerto:22
PERFORMANCE TUNING
puerto:22
TRADEOFFS
puerto:22
DIMENSIONS OF
PERFORMANCE
puerto:22
Easy
Fast
Inexpensive
puerto:22
Easy
Fast
Inexpensive
puerto:22
Easy
Fast
Inexpensive
puerto:22
Easy
Fast
Inexpensive
puerto:22
PICK ANY TWO
Easy
Fast
Inexpensive
puerto:22
MEASURE
puerto:22
OPTIMIZATION
! "
#
Measure Analyze
Change
puerto:22
OPTIMIZATION
! "
#
Measure
Pick a metric
puerto:22
OPTIMIZATION
! "
#
Analyze
Advance an
hypothesis
Plan a course
of action
puerto:22
OPTIMIZATION
! "
#
Change Act!
puerto:22
OPTIMIZATION
! "
#
Measure
Get a new
measurement
of the same
metric
puerto:22
OPTIMIZATION
! "
#
Measure Analyze
Change
puerto:22
CLIENT VS SERVER
$
!!
puerto:22
CLIENT VS SERVER
$
!!
!
! !
!
WordPress Performance Tuning
WordPress Performance Tuning
Time To First Byte
WordPress Performance Tuning
WordPress Performance Tuning
puerto:22
METRICS!
• Client: Load time
• Developer Tools, Yslow, PageSpeed, Pingdom
• Server: Requests per second
• ApacheBench, siege, httperf
puerto:22
APACHEBENCH
This is ApacheBench, Version 2.3 <$Revision: 1706008 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking demo2.demoinc.com (be patient).....done
Server Software: Apache
Server Hostname: demo2.demoinc.com
Server Port: 80
Document Path: /
Document Length: 10884 bytes
Concurrency Level: 10
Time taken for tests: 15.467 seconds
Complete requests: 100
Failed requests: 0
Total transferred: 1114376 bytes
HTML transferred: 1088400 bytes
Requests per second: 6.47 [#/sec] (mean)
Time per request: 1546.727 [ms] (mean)
Time per request: 154.673 [ms] (mean, across all concurrent requests)
Transfer rate: 70.36 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 54 67 20.9 60 196
Processing: 555 1430 280.4 1466 1808
Waiting: 439 1314 267.0 1369 1644
Total: 615 1497 277.6 1528 1871
Percentage of the requests served within a certain time (ms)
50% 1528
66% 1621
75% 1680
80% 1736
90% 1796
95% 1843
98% 1871
99% 1871
100% 1871 (longest request)
puerto:22
SIEGE
** SIEGE 3.0.8
** Preparing 20 concurrent users for battle.
The server is now under siege.. done.
Transactions: 2000 hits
Availability: 100.00 %
Elapsed time: 59.53 secs
Data transferred: 6.73 MB
Response time: 0.01 secs
Transaction rate: 33.60 trans/sec
Throughput: 0.11 MB/sec
Concurrency: 0.19
Successful transactions: 2000
Failed transactions: 0
Longest transaction: 0.04
Shortest transaction: 0.00
puerto:22
HTTPERF
httperf --hog --timeout=5 --client=0/1 --server=demo2.demoinc.com --port=80 --uri=/
--rate=10 --send-buffer=4096 --recv-buffer=16384 --num-conns=100 --num-calls=1
httperf: warning: open file limit > FD_SETSIZE; limiting max. # of open files to
FD_SETSIZE
Maximum connect burst length: 1
Total: connections 100 requests 100 replies 100 test-duration 9.903 s
Connection rate: 10.1 conn/s (99.0 ms/conn, <=1 concurrent connections)
Connection time [ms]: min 2.2 avg 2.8 max 6.8 median 2.5 stddev 0.6
Connection time [ms]: connect 0.7
Connection length [replies/conn]: 1.000
Request rate: 10.1 req/s (99.0 ms/req)
Request size [B]: 77.0
Reply rate [replies/s]: min 10.0 avg 10.0 max 10.0 stddev 0.0 (1 samples)
Reply time [ms]: response 1.8 transfer 0.3
Reply size [B]: header 266.0 content 10884.0 footer 0.0 (total 11150.0)
Reply status: 1xx=0 2xx=100 3xx=0 4xx=0 5xx=0
CPU time [s]: user 3.54 system 6.27 (user 35.7% system 63.3% total 99.1%)
Net I/O: 110.7 KB/s (0.9*10^6 bps)
Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0
Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0
puerto:22
ASIDE: LOG
51.15.54.100 - - 

[02/Dec/2016:11:45:27 +0000] "GET / HTTP/1.1" 200 5076 "-" 

"Mozilla/5.0 (pc-x86_64-linux-gnu)" "-" "D=11724"
puerto:22
SPEED AND EFFICIENCY
• speed: swiftness or rate of performance or action: velocity
• efficiency: productivity without waste
https://www.merriam-webster.com/
puerto:22
AREAS OF OPPORTUNITY
• Number of Plugins
• Number/size of Assets
• Database Queries
• API Calls
WordPress Performance Tuning
WordPress Performance Tuning
https://premium.wpmudev.org/blog/essential-wordpress-plugins/
puerto:22
PLUGINS
• Profile
• Delete unused plugins
• Eliminate redundancy
• When in doubt, delete
puerto:22
PROFILE!
puerto:22
P³ (PLUGIN PERFORMANCE PROFILER)
puerto:22
XCACHE + CACHEGRIND
puerto:22
ASSETS
• Concatenate
• Minify
• Compress
• Make cache-friendly
• Offload
puerto:22
puerto:22
puerto:22
DATABASE
• Offload
• Index
• Cache
• Objects
• Queries
puerto:22
API CALLS
• Theme optimization
• Opcode Caching
puerto:22
APPROXIMATE
STATIC-PAGE SERVING
puerto:22
DON’T RE-GENERATE
WHAT YOU CAN CACHE
puerto:22
CACHING
• varnish
• memcached/redis
• WP Super Cache
• W3 Total Cache
puerto:22
CACHING
• Improved serving time
• Less server load
puerto:22
CACHING
WP
Database
puerto:22
CACHING
WP
Database
varnish
puerto:22
CACHING
WP
Databasememcached
redis
puerto:22
W3 Total Cache
CACHING
WP
Database
puerto:22
W3 TOTAL CACHE
• Disk caching
• Database caching
• Object caching
• CDN
puerto:22
DON’T SERVE ASSETS THAT
OTHERS ARE WILLING TO
SERVE FOR YOU
puerto:22
OFFLOADING
• Content Distribution Networks
• Edge Serving
• Edge Caching
puerto:22
WP
puerto:22
IMG
IMG
IMG
IMG
IMG
WP
puerto:22
IMG
IMG
IMG
IMG
IMG
WP
puerto:22
WP
WP
WP
WP
WP
WP
puerto:22
OFFLOADING
• Overcome single-host bottleneck
• Less server load
• Less bandwidth usage
puerto:22
OFFLOADING
HTML
CSS
JS
WOF
IMG
puerto:22
OFFLOADING
HTML
CSS
JS
WOF
IMG
puerto:22
OFFLOADING
HTML
CSS
JS
WOF
IMG
puerto:22
SCALING
puerto:22
SCALING STRATEGIES
• Database spin-off
• Scale Vertically
• Scale Horizontally
puerto:22
DATABASE SPIN-OFF
WP
Database
puerto:22
DATABASE SPIN-OFF
WP Database
puerto:22
SCALE VERTICALLY
puerto:22
SCALE VERTICALLY
puerto:22
SCALE HORIZONTALLY
puerto:22
SCALE HORIZONTALLY
puerto:22
SCALE HORIZONTALLY
WP WP WPWP
puerto:22
SCALE HORIZONTALLY
WP WP WPWP
Database
puerto:22
LOAD BALANCING
WP WP WPWP
Load Balancer
Database
puerto:22
LOAD BALANCING
WP WP WPWP
Load Balancer
Database
puerto:22
ELASTICITY
WP WP
Load Balancer
Database
puerto:22
ELASTICITY
WP WPWP
Load Balancer
Database
puerto:22
ELASTICITY
WP WP WPWP
Load Balancer
Database
puerto:22
FRONT-END CACHING
WP WP WPWP
Cache Cache
Load Balancer
Database
puerto:22
DATABASE
• Cache
• Index
• Spin off
• Replication
• Partitioning
Check your slow_queries log!
puerto:22
REPLICATION
WP WP WPWP
Load Balancer
Master Replica
puerto:22
Partition B
PARTITIONING
WP WP WPWP
Load Balancer
Partition A
puerto:22
Partition B
PARTITIONING
WP WP WPWP
Load Balancer
Partition A
puerto:22
DATABASE
• HyperDB
puerto:22
SERVER STACK
Operating System
Web Server
PHP RE
WordPress
Theme Plugins
Hardware
Database
puerto:22
SERVER STACK
Operating System
Web Server
PHP RE
WordPress
Theme Plugins
Hardware
Database
SSD, IOPS
Scaling
Cache
Index
Spinoff
Replication
Partitioning
APC
Xcache
varnish
W3 Total Cache
HyperDB
Networking
Resource allocation
puerto:22
DEFAULT STACK
Operating System
Web Server
PHP RE
WordPress
Theme Plugins
Hardware
DatabaseApache
Zend
mod_php
puerto:22
ALTERNATE STACK
Operating System
Web Server
PHP RE
WordPress
Theme Plugins
Hardware
Databasenginx
HHVM
fastcgi
puerto:22
SEE ALSO
• WordPress Optimization

https://codex.wordpress.org/WordPress_Optimization
puerto:22
SUMMARY
• Performance Tuning is a process, not a product.
• Measure. Profile.
• Optimize your WordPress installation prior to scaling.
• Look at the big picture.
• Leverage Caching and Content Delivery Networks.
puerto:22
Q&A
puerto:22
THANK YOU!
Javier Arturo Rodríguez
@codehead
http://scribd.com/javierrgz/

More Related Content

PDF
Using NGINX as an Effective and Highly Available Content Cache
PPTX
Rate Limiting with NGINX and NGINX Plus
PDF
Dicas e truques de otimização de websites python
PDF
High Availability Content Caching with NGINX
PPTX
5 things you didn't know nginx could do
PDF
Load Balancing with Nginx
PDF
Altitude SF 2017: QUIC - A low-latency secure transport for HTTP
PDF
ITB2017 - Nginx Effective High Availability Content Caching
Using NGINX as an Effective and Highly Available Content Cache
Rate Limiting with NGINX and NGINX Plus
Dicas e truques de otimização de websites python
High Availability Content Caching with NGINX
5 things you didn't know nginx could do
Load Balancing with Nginx
Altitude SF 2017: QUIC - A low-latency secure transport for HTTP
ITB2017 - Nginx Effective High Availability Content Caching

What's hot (20)

PPTX
Delivering High Performance Websites with NGINX
PDF
Varnish SSL / TLS
PPTX
High Availability Content Caching with NGINX
PPTX
NGINX High-performance Caching
PDF
DockerCon Live 2020 - Securing Your Containerized Application with NGINX
KEY
Nginx - Tips and Tricks.
PPTX
5 things you didn't know nginx could do velocity
PDF
Extending functionality in nginx, with modules!
PDF
NGINX: The Past, Present and Future of the Modern Web
KEY
第0回ワススタ!! #wasbookを読もう
PDF
Zi nginx conf_2015
PDF
How to monitor NGINX
PPTX
Dhcp security #netseckh
PDF
Django and Nginx reverse proxy cache
PDF
Redis
PDF
Tsig 17022011
PDF
What's New in NGINX Plus R12?
PDF
Linux kernel TLS и HTTPS / Александр Крижановский (Tempesta Technologies)
PPTX
State of Authenticating RESTful APIs
PDF
Kubernetes at Datadog Scale
Delivering High Performance Websites with NGINX
Varnish SSL / TLS
High Availability Content Caching with NGINX
NGINX High-performance Caching
DockerCon Live 2020 - Securing Your Containerized Application with NGINX
Nginx - Tips and Tricks.
5 things you didn't know nginx could do velocity
Extending functionality in nginx, with modules!
NGINX: The Past, Present and Future of the Modern Web
第0回ワススタ!! #wasbookを読もう
Zi nginx conf_2015
How to monitor NGINX
Dhcp security #netseckh
Django and Nginx reverse proxy cache
Redis
Tsig 17022011
What's New in NGINX Plus R12?
Linux kernel TLS и HTTPS / Александр Крижановский (Tempesta Technologies)
State of Authenticating RESTful APIs
Kubernetes at Datadog Scale
Ad

Similar to WordPress Performance Tuning (20)

PDF
Introduction to performance tuning perl web applications
PDF
Improving WordPress Performance with Xdebug and PHP Profiling
KEY
Apache httpd-2.4 : Watch out cloud!
PDF
ApacheCon 2014 - What's New in Apache httpd 2.4
PDF
Improving WordPress performance (xdebug and profiling)
PDF
IPW2008 - my.opera.com scalability
PDF
What's New and Newer in Apache httpd-24
PDF
Meeting 13. web server i
PDF
Scale Apache with Nginx
PPT
Configuring Apache Servers for Better Web Perormance
PPTX
Improving WordPress Performance: Xdebug and PHP profiling
PDF
WordCamp RVA 2011 - Performance & Tuning
ODP
Apache httpd 2.4: The Cloud Killer App
PDF
NPW2009 - my.opera.com scalability v2.0
KEY
Site Performance - From Pinto to Ferrari
PPTX
Apache Performance Tuning: Scaling Out
PPT
Roy foubister (hosting high traffic sites on a tight budget)
PDF
23 Ways To Speed Up WordPress
ODP
web server
PPTX
Apache Performance Tuning: Scaling Up
Introduction to performance tuning perl web applications
Improving WordPress Performance with Xdebug and PHP Profiling
Apache httpd-2.4 : Watch out cloud!
ApacheCon 2014 - What's New in Apache httpd 2.4
Improving WordPress performance (xdebug and profiling)
IPW2008 - my.opera.com scalability
What's New and Newer in Apache httpd-24
Meeting 13. web server i
Scale Apache with Nginx
Configuring Apache Servers for Better Web Perormance
Improving WordPress Performance: Xdebug and PHP profiling
WordCamp RVA 2011 - Performance & Tuning
Apache httpd 2.4: The Cloud Killer App
NPW2009 - my.opera.com scalability v2.0
Site Performance - From Pinto to Ferrari
Apache Performance Tuning: Scaling Out
Roy foubister (hosting high traffic sites on a tight budget)
23 Ways To Speed Up WordPress
web server
Apache Performance Tuning: Scaling Up
Ad

More from Javier Arturo Rodríguez (9)

PDF
Introduction to ansible
PDF
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty program...
PDF
WordPress for SysAdmins
PDF
Easy native wrappers with SWIG
PDF
Open Data: a view from the trenches
PDF
Barcelona.pm Curs1211 sess01
PDF
Build an autoversioning filesystem with Apache2
PDF
Periodismo de Datos II: Construyendo y explorando conjuntos de datos con las ...
PDF
DatosEnCrudo.org
Introduction to ansible
Minimizing cognitive load
 in Perl source code parsing (a.k.a. Pretty program...
WordPress for SysAdmins
Easy native wrappers with SWIG
Open Data: a view from the trenches
Barcelona.pm Curs1211 sess01
Build an autoversioning filesystem with Apache2
Periodismo de Datos II: Construyendo y explorando conjuntos de datos con las ...
DatosEnCrudo.org

Recently uploaded (20)

PDF
Modernizing your data center with Dell and AMD
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Big Data Technologies - Introduction.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Machine learning based COVID-19 study performance prediction
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
Modernizing your data center with Dell and AMD
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Review of recent advances in non-invasive hemoglobin estimation
Understanding_Digital_Forensics_Presentation.pptx
Spectral efficient network and resource selection model in 5G networks
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
“AI and Expert System Decision Support & Business Intelligence Systems”
Big Data Technologies - Introduction.pptx
20250228 LYD VKU AI Blended-Learning.pptx
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Machine learning based COVID-19 study performance prediction
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Network Security Unit 5.pdf for BCA BBA.
Empathic Computing: Creating Shared Understanding
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Building Integrated photovoltaic BIPV_UPV.pdf

WordPress Performance Tuning