Mature optimization (Carlos Bueno, Facebook)

922 views

Published on

HighLoad++ 2013

Published in: Technology, Education
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
922
On SlideShare
0
From Embeds
0
Number of Embeds
231
Actions
Shares
0
Downloads
8
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Mature optimization (Carlos Bueno, Facebook)

  1. 1. Mature Optimization Carlos Bueno <carlos@bueno.org>
  2. 2. FACT: You are not clairvoyant.
  3. 3. Who cares? Very obvious!
  4. 4. The Plan 1: Measure Carefully. 2: ???? 3: Profit!
  5. 5. The Plan (revised) 0: Define the Problem. 1: Measure Carefully. 2: ???? 3: Profit!
  6. 6. Define the Problem. “WidgetFactoryServer is too slow!”
  7. 7. Define the Problem. “WidgetFactoryServer is too slow!” Problem definitions must be specific enough to suggest a way forward, and testable. You need a falsifiable statement.
  8. 8. Define the Problem. •  WidgetFactoryServer is CPU-bound •  Run a profiler •  Optimize the slow functions •  CPU time should decrease
  9. 9. FACT: People have a lot of advice about writing fast programs. Most of it is horseshit.
  10. 10. HipHop Virtual Machine (HHVM) JIT CPU Time C++
  11. 11. The Plan 0: Define the Problem. 1: Measure Carefully. 2: ???? 3: Profit!
  12. 12. Measure continuously.
  13. 13. Daily & Weekly Cycles
  14. 14. Collect RAW data, not metrics.
  15. 15. Record lots of metadata.
  16. 16. Directly measure what you are optimizing.
  17. 17. Distrust numbers. Especially your own.
  18. 18. “I don’t believe in the Performance Fairy.” Jeff Rothschild
  19. 19. Monitoring & Investigation •  Crashing is cheap. •  No errors logged, but no data returned. •  Did you buy faster servers? •  Did you turn off slower servers? •  Did some servers just die?
  20. 20. Choose metrics carefully.
  21. 21. Questions? carlos.bueno.org/optimization

×