DrupalCon Austin: Planning for Performance
-
Upload
jeff-beeman -
Category
Technology
-
view
296 -
download
0
Transcript of DrupalCon Austin: Planning for Performance
![Page 1: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/1.jpg)
![Page 2: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/2.jpg)
Jeff Beeman (jrbeeman)Erik Webb (erikwebb)
Planning for Performance
![Page 3: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/3.jpg)
About Jeff
• Technical Team Lead
• Focus on Architecture, Deployment, Delivery
• Joined Acquia in late 2010
• 9+ years with Drupal
• Lead architect on many large-scale Drupal projects
![Page 4: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/4.jpg)
About Erik
• Technical Team Lead
• Focus on Performance, Infrastructure, and Scalability
• Joined Acquia in early 2010
• 7+ years with Drupal
• 12+ years with LAMP
![Page 5: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/5.jpg)
https://portland2013.drupal.org/node/2208
![Page 6: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/6.jpg)
Lessons we won't cover here...
CDNs
Minification
Far-future expiration
Cache purging
Client-side rendering
Profiling
![Page 7: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/7.jpg)
Lessons we will cover here...
• Don't rely on intuition: Learn how to measure, assess, and respond based on real data.
• Tools only solve problems you know about.
• By the time you're "tuning," it may be too late.
![Page 8: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/8.jpg)
Top Drupal performance problems
![Page 9: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/9.jpg)
This is about planning!
![Page 10: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/10.jpg)
Why can't we just use X…?
• Deadlines and delivery don't often come with a second chance.
• Gather data first, then choose to optimize.
• Bad architecture cannot be "tuned."
![Page 11: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/11.jpg)
Use cases
![Page 12: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/12.jpg)
Make your marketing team happy!
![Page 13: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/13.jpg)
Define goals
![Page 14: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/14.jpg)
Defining goals
• Context is critical when defining goals• User type: Anonymous vs. authenticated• Page type: Homepage vs. article page
![Page 15: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/15.jpg)
Defining goals: examples
• Bad: The homepage should load in 3s or less.
• Good: The homepage should be delivered to anonymous users within 500ms and fully render within 3s.
• Bad: Any single page should never take longer than 2s to fully load.
• Good: Any single page should fully render to users within 2s for 99% of requests.
![Page 16: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/16.jpg)
Setting goalsPage delivery (TTFB) Page render
User type Page type Median Maximum Median Maximum
Anonymous
<Aggregate>
Homepage
User profile
Article page
Static page
Authenticated
<Aggregate>
Homepage
User login
My profile
Post content
Logout
![Page 17: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/17.jpg)
Caching isn't just "on" or "off"
![Page 18: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/18.jpg)
Cache effectiveness
• Cardinality• Granularity• Cache expiration (time vs. action)• Rebuild cost
![Page 19: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/19.jpg)
Granularity
The functional differentiation for each cache item.
![Page 20: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/20.jpg)
The number of variations created for a single cache item.
Cardinality
![Page 21: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/21.jpg)
Cache expiration
Period at which cache should be expired.
![Page 22: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/22.jpg)
Resources required to rebuild the cache.
Cost to rebuild cache
![Page 23: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/23.jpg)
Strategic decisions
• This is about establishing a cache strategy.
• Not every architecture supports the same performance plan.
• These are not just technical choices.• Should be driven by stakeholders, not
just developers.
![Page 24: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/24.jpg)
Stop talking about Drupal!
![Page 25: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/25.jpg)
Now for an example!
![Page 26: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/26.jpg)
![Page 27: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/27.jpg)
![Page 28: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/28.jpg)
![Page 29: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/29.jpg)
![Page 30: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/30.jpg)
![Page 31: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/31.jpg)
![Page 32: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/32.jpg)
![Page 33: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/33.jpg)
![Page 34: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/34.jpg)
Use your wireframes!
• Cardinality• Granularity• Cache expiration (time vs. action)• Rebuild cost
![Page 35: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/35.jpg)
![Page 36: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/36.jpg)
New tech solves tech problems, not project problems.
![Page 37: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/37.jpg)
Monitoring
Client Monitoring
Application Monitoring
Request Profiling
Metrics/Instrumentation
XHProf
Log Monitoring
![Page 38: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/38.jpg)
You know what they say about assumptions...• NEVER assume a warm cache, unless
your deployment makes that always true.• NEVER assume your caching layer is
persistent (even when it is).• NEVER assume performance will be solid
because of "good architecture."• NEVER assume all features can be
implemented in a performant way.*
![Page 39: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/39.jpg)
You know what they say about assumptions...• NEVER assume that the problem is in
custom code.• NEVER assume a well-used module is a
well-performing one.
![Page 40: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/40.jpg)
![Page 41: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/41.jpg)
Catch it early
• Develop with data on par with production: Data volume and values matter!
• Ensure diagnostic tools are available locally for devs.
• Hold all devs accountable for performance.
• Don't jump to conclusions without data.
![Page 42: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/42.jpg)
Summary
• Planning for performance means setting goals and defining strategies.
• Establish a cache strategy for page components: Cardinality, granularity, cache expiration, rebuild cost.
• Data matters: Don't make decisions or assumptions without it.
![Page 43: DrupalCon Austin: Planning for Performance](https://reader034.fdocuments.in/reader034/viewer/2022042716/55a785821a28ab8d188b4581/html5/thumbnails/43.jpg)
Questions?
@doogiemac / @erikwebb
We're hiring!
Evaluate this session: austin2014.drupal.org/schedule