main
1Rails Performance Optimization
2
3[links]
4http://retrofuturistictech.quora.com/Bouncing-Balls-in-the-Cloud
5http://tenderlovemaking.com/2012/06/18/removing-config-threadsafe.html
6http://aphyr.com/posts/278-timelike-2-everything-fails-all-the-time
7https://blog.heroku.com/archives/2013/4/3/routing_and_web_performance_on_heroku_a_faq
8http://jdorfman.posthaven.com/medium-bitcoin-660x493-dot-jpg-cdn-vs-s3
9http://www.holovaty.com/writing/aws-notes/
10http://www.rubyops.net/gems/httperfrb
11http://pivotallabs.com/133-performance-and-scalability-make-your-app-just-fast-enough-in-an-agile-way/
12https://github.com/rails/rails-perftest
13http://rubylearning.com/blog/2011/08/14/performance-testing-rails-applications-how-to/
14https://github.com/sportngin/simple_benchmark
15http://www.slideshare.net/drhenner/optimize-the-obvious-7636674
16http://www.windycityrails.org/videos/2011/#2
17
18
19Intro
20 - Who I am
21 - What I work on
22 - *Hero of the talk*
23 - Donald Knuth wrote, "We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%."
24
25What does performance mean
26 - characterized by the amount of useful work accomplished by a computer system compared to the time and resources used.
27
28Performance: Load
29 - How much work is there
30
31Performance: Utilization
32 - How much of the resources are in use
33
34Performance: Scalability
35 - How can we handle the load
36
37Performance: Throughput
38 - How many tasks can be done per unit of time
39
40Performance: Concurerency
41 - How many tasks can we do at once
42
43Performance: Capacity
44 - How big can our throughput go before things fall apart
45
46Actually...
47 - Another testing talk
48 - Optimizing up front is often regarded as breaking YouArentGonnaNeedIt (YAGNI).
49 - PrematureOptimization is an AntiPattern, since there is only cost and no benefit.
50
51Why does performance matter
52 - Slow page respone time results in increased page abandonment
53 - Source: http://blog.kissmetrics.com/loading-time/?wide=1
54 - Page size: http://httparchive.org/interesting.php?a=All&l=Jun%201%202013&s=All
55
56When do you performance test
57 - At the end? Freak out!
58 - Proactive vs Reactive
59 - Premature optimization (see above)
60
61Sample application
62 - Show performance baseline
63
64Deploy application
65 - Check performance
66 - Explain network latency
67
68Switch from thin to unicorn
69
70Offload assets
71
72N+1 hunt
73
74Index hunt