Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Benchmarking – lightning.io

Benchmarking – lightning.io

My lightning talk about benchmarking.

Paweł Ledwoń

July 21, 2012
Tweet

More Decks by Paweł Ledwoń

Other Decks in Programming

Transcript

  1. MILLION REASONS Find limits Estimate hardware needs Check high-load stability

    Test software updates Find optimal hardware Gain confidence in the system Show some numbers to customers
  2. is it node.js? WHATTHEFUCKWENTWRONG? is it amazon? are we io

    bound? are we cpu bound? are we memory bound? am i rubbish? is it garbage collector? is it ruby? how about kernel? bad day? maybe it’s event machine?... or em-websocket? hmmm... or tcp? or redis? context switching? haproxy? why am i doing this?
  3. is it node.js? WHAT WENT WRONG? is it amazon? are

    we io bound? are we cpu bound? are we memory bound? am i rubbish? is it garbage collector? is it ruby? how about kernel? bad day? maybe it’s event machine?... or em-websocket? hmmm... or tcp? or redis? context switching? haproxy? why am i doing this?
  4. DO MICROBENCHMARKS 1. rule out many parts of the stack

    2. find upper boundaries 3. understand the components 4. profile misbehaving parts hell, even start with them
  5. WHAT’S THE ISSUE? • impossible to test glue code •

    more things running at once • memory/cpu patterns differ • and much more…
  6. WHY IS IT DIFFICULT? • too many variables • too

    many side-effects • hard to isolate anything
  7. PROPER EXPERIMENTS • know what you are looking for •

    change one variable at a time • monitor everything • sometimes guess
  8. WHEN IT’S CHEAP • is 1.9.3 faster than 1.9.2? how’s

    memory? • can we upgrade operating system? • m1.large or c1.xlarge? or maybe dedicated? • how awesome is this em-websocket patch? • did the performance change over the time?