Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
Un-Scaling WordPress WordCamp DC 2017 Mike Schroder Director of WordPress Strategy @ DreamHost @GetSource - https://getsource.net
Slide 2
Slide 2 text
What does it mean to scale?
Slide 3
Slide 3 text
Vertical scaling: More RAM and CPU.
Slide 4
Slide 4 text
Horizontal scaling: More servers with the RAM and CPU.
Slide 5
Slide 5 text
Vertical scaling
Slide 6
Slide 6 text
Vertical scaling
Slide 7
Slide 7 text
Horizontal scaling
Slide 8
Slide 8 text
Horizontal scaling
Slide 9
Slide 9 text
What does it mean to un-scale?
Slide 10
Slide 10 text
No content
Slide 11
Slide 11 text
Simplified architecture.
Slide 12
Slide 12 text
Let’s see what we can do with shared and a 512mb VPS.
Slide 13
Slide 13 text
How much RAM does WordPress need?
Slide 14
Slide 14 text
Page View => ~3-120mb Image Operations => ~256mb+
Slide 15
Slide 15 text
Does WordPress scale?
Slide 16
Slide 16 text
Adjacent technologies help WordPress serve higher traffic sites well.
Slide 17
Slide 17 text
We’re really talking about caching.
Slide 18
Slide 18 text
If you’ve hit PHP, you’ve lost.
Slide 19
Slide 19 text
But it’s not as bad as it used to be.
Slide 20
Slide 20 text
Opcode cache.
Slide 21
Slide 21 text
Usually OPcache, included with PHP 5.5+
Slide 22
Slide 22 text
Higher percentage of improvement on hosts with low CPU resources.
Slide 23
Slide 23 text
Test: ~100 users during 1 minute.
Slide 24
Slide 24 text
Shared PHP 5.6 100/min Average: 1045ms
Slide 25
Slide 25 text
Shared PHP 5.6 w/OPcache 100/min Average: 782ms
Slide 26
Slide 26 text
Shared PHP 7 100/min Average: 760ms
Slide 27
Slide 27 text
Shared PHP 7 w/OPcache 100/min Average: 507ms
Slide 28
Slide 28 text
Persistent object caching.
Slide 29
Slide 29 text
By default, WP’s internal cache expires with each request.
Slide 30
Slide 30 text
Persistent object caching helps dynamic sites most.
Slide 31
Slide 31 text
Usually this is Memcached or Redis.
Slide 32
Slide 32 text
Front end caching.
Slide 33
Slide 33 text
Save the final output of PHP.
Slide 34
Slide 34 text
Disk, Varnish, Nginx.
Slide 35
Slide 35 text
Front end caching helps static sites most.
Slide 36
Slide 36 text
Shared PHP 7 w/OPcache + WP Super Cache PHP Routed: 100/min Average: 69ms
Slide 37
Slide 37 text
Like with “firewall” plugins, treat PHP-based solutions with skepticism.
Slide 38
Slide 38 text
Shared PHP 7 w/OPcache + WP Super Cache Disk Backed: 100/min Average: 32ms
Slide 39
Slide 39 text
Shared PHP 7 w/OPcache + WP Super Cache Disk Backed: 1000/min Average: 43ms
Slide 40
Slide 40 text
Shared PHP 7 w/OPcache + WP Super Cache Disk Backed: 5000/min Average: 2158ms
Slide 41
Slide 41 text
Let’s take a look at our VPS.
Slide 42
Slide 42 text
VPS PHP 7 w/OPcache 100/min Average: 169ms
Slide 43
Slide 43 text
VPS PHP 7 w/OPcache + Varnish RAM Backed 100/min Average: 21ms
Slide 44
Slide 44 text
VPS PHP 7 w/OPcache + Varnish RAM Backed 5000/min Average: 17ms
Slide 45
Slide 45 text
5000/min => 216,000,000/month
Slide 46
Slide 46 text
How much RAM do adjacent services need?
Slide 47
Slide 47 text
Basically anything helps for OPcache. So have some.
Slide 48
Slide 48 text
32-96mb for Memcached, with slab size > than options. (4mb is a good start)
Slide 49
Slide 49 text
128mb Varnish Have some VCL. https://github.com/tollmanz/varnish-vcl-collection
Slide 50
Slide 50 text
Thanks! Mike Schroder @GetSource https://getsource.net Director of WordPress Strategy @ DreamHost