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

Profiling Node.js apps on production

Profiling Node.js apps on production

A talk about Node.js profiling on production using Linux perf_events and FlameGraph/FlameScope, and a couple of findings

See https://shuheikagawa.com/blog/2018/09/16/node-js-under-a-microscope/ for more details

Shuhei Kagawa

June 06, 2019
Tweet

More Decks by Shuhei Kagawa

Other Decks in Technology

Transcript

  1. 8

  2. 13 # Install dependencies for `perf` command sudo apt-get install

    linux-tools-common sudo apt-get install linux-tools-$(uname -r)
  3. 14 # Record stack traces 99 times per second for

    30 seconds sudo perf record -F 99 -p ${pid} -g -- sleep 30s # Generate human readable stack traces sudo perf script > stacks.${pid}.out
  4. 16

  5. 25

  6. 27

  7. 30 • CPU Flame Graphs • FlameScope • A sample

    project • How to fix wrong symbols • Node.js under a Microscope Links