22. Database slowness
Many backend performance issues are caused by too many, or
slow queries.
Mysql has a pretty terrible query planner.
Sub-queries and derived table joins will eventually catch fire.
Slow query logs, mtop, or monitoring like new relic are your best
friend.
Saturday, 9 November, 13
23. Database slowness
Slow query logs - Percona makes great tools for MySQL.
Disable query caching.
Run EXPLAIN on slow queries.
Add indexes/tweak queries, and repeat.
Saturday, 9 November, 13
27. Caching
Can be expensive to rollout, if you need new infrastructure
Cache expiration is really really hard.
Saturday, 9 November, 13
28. What to Cache
Results that don’t change often
Use monitoring/analytics to find the busiest pages.
Start using caching there.
Expand once you’ve learned more.
Saturday, 9 November, 13
34. Javascript tools
Chrome dev tools are the gold standard.
CPU profiles are invaluable.
Heap comparisons can be used to find memory leaks.
Saturday, 9 November, 13
40. XHProf
PECL extension produced by Facebook.
Captures runtime metrics at a function level.
Possible to use in a sub-sample of production unlike xdebug.
Saturday, 9 November, 13