Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

My talk at Linux Piter 2016

1,665 views

Published on

My talk on project Kaldur at Linux Piter 2016

Published in: Technology
  • Be the first to comment

  • Be the first to like this

My talk at Linux Piter 2016

  1. 1. On performance analyzing again: Gathering and visualizing flamegraphs in realtime in Linux environment Alex Chistyakov, DataArt Linux Piter 2016, Russia, SPb. Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 1 / 51
  2. 2. Who I am (very quickly) Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 2 / 51 • Senior SW Developer @ DataArt • More than 18 years of professional experience • Researcher @ ISST Lab, ITMO • Used to be a DevOps Engineer and still probably am • Can’t quit making presentations w/lots of bullets (that’s terrible, I know)
  3. 3. Performance optimization is not that hard Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 3 / 51
  4. 4. Ever heard of a ’comfort zone’? Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 4 / 51 • It’s crucial to be out of it to learn something new
  5. 5. Ever heard of a ’comfort zone’? Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 5 / 51 • It’s crucial to be out of it to learn something new • So I made this presentation in TeX
  6. 6. Ever heard of a ’comfort zone’? Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 6 / 51 • It’s crucial to be out of it to learn something new • So I made this presentation in TeX • With lots of bullets, you know
  7. 7. Ever heard of a ’comfort zone’? Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 7 / 51 • It’s crucial to be out of it to learn something new • So I made this presentation in TeX • With lots of bullets, you know • Because I’m not ready yet to leave my comfort zone entirely
  8. 8. Ever heard of a ’comfort zone’? Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 8 / 51 • It’s crucial to be out of it to learn something new • So I made this presentation in TeX • With lots of bullets, you know • Because I’m not ready yet to leave my comfort zone entirely • Damn, TeX seems to be my new comfort zone ;(
  9. 9. Okay, flashback to LP 2015 (w/no bullets) Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 9 / 51
  10. 10. Fast-forward to 2016 Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 10 / 51 Brendan Gregg declared Linux DTrace-complete!
  11. 11. A great step forward for mankind... Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 11 / 51 ...but I’m a cat
  12. 12. So, what is this all about? Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 12 / 51 • Modern GNU/Linux
  13. 13. So, what is this all about? Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 13 / 51 • Modern GNU/Linux • A web application
  14. 14. So, what is this all about? Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 14 / 51 • Modern GNU/Linux • A web application • Collecting flamegraphs
  15. 15. So, what is this all about? Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 15 / 51 • Modern GNU/Linux • A web application • Collecting flamegraphs • Visualizing collected flamegraphs
  16. 16. Okay, but what are these flame... things? Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 16 / 51 Did you attend LP 2015?
  17. 17. Doing flamegraphs in 2016 is extremely easy Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 17 / 51
  18. 18. A hicker needs good boots Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 18 / 51
  19. 19. So, we need a language Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 19 / 51
  20. 20. The obvious choice Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 20 / 51
  21. 21. Why Lisp? Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 21 / 51 • Homoiconicity
  22. 22. Why Lisp? Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 22 / 51 • Homoiconicity • Macros
  23. 23. Why Lisp? Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 23 / 51 • Homoiconicity • Macros • Immutability (?)
  24. 24. Why Lisp? Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 24 / 51 • Homoiconicity • Macros • Immutability (?) • Lambdas
  25. 25. But that was not too democratic, so... Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 25 / 51 ...what about Golang?
  26. 26. Unfortunately, Golang loses Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 26 / 51 • Way too modern (uses design ideas from 1970s while Lisp was born in 1958)
  27. 27. Unfortunately, Golang loses Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 27 / 51 • Way too modern (uses design ideas from 1970s while Lisp was born in 1958) • Not functional enough (as in ’functional programming’)
  28. 28. Unfortunately, Golang loses Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 28 / 51 • Way too modern (uses design ideas from 1970s while Lisp was born in 1958) • Not functional enough (as in ’functional programming’) • Targets Java 1.2 and PHP 4.x market share (designed for apes not humans)
  29. 29. Runtime matters! Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 29 / 51 • Static linking is a must
  30. 30. Runtime matters! Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 30 / 51 • Static linking is a must • Decent GC is a must
  31. 31. Runtime matters! Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 31 / 51 • Static linking is a must • Decent GC is a must • Resulting files should not be too big
  32. 32. Runtime matters! Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 32 / 51 • Static linking is a must • Decent GC is a must • Resulting files should not be too big • Let’s consider measureable things only
  33. 33. So, Lisps then Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 33 / 51 • Common Lisp • Scheme
  34. 34. Common Lisp Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 34 / 51 Statically linked file is over 30Mb (Golang does around 8Mb)
  35. 35. Scheme Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 35 / 51 Is minimalist by design (way too minimalist I’d say)
  36. 36. So, no boots then? Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 36 / 51
  37. 37. Nim to the rescue! Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 37 / 51 Nim (formerly Nimrod)
  38. 38. Nim: the good parts Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 38 / 51 • Strong typing
  39. 39. Nim: the good parts Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 39 / 51 • Strong typing • Static typing
  40. 40. Nim: the good parts Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 40 / 51 • Strong typing • Static typing • Homoiconicity
  41. 41. Nim: the good parts Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 41 / 51 • Strong typing • Static typing • Homoiconicity • Macro system (hygienic)
  42. 42. Nim: the good parts Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 42 / 51 • Strong typing • Static typing • Homoiconicity • Macro system (hygienic) • Immutability
  43. 43. Nim: the good parts Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 43 / 51 • Strong typing • Static typing • Homoiconicity • Macro system (hygienic) • Immutability • Templates (generics)
  44. 44. Nim: runtime goodness Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 44 / 51 • Uses C as an IR
  45. 45. Nim: runtime goodness Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 45 / 51 • Uses C as an IR • Per thread GC (as in Erlang)
  46. 46. Nim: runtime goodness Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 46 / 51 • Uses C as an IR • Per thread GC (as in Erlang) • Statically linked files < 1Mb (not stripped)
  47. 47. Project Kaldur Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 47 / 51 • Means ’cold’ in Faroese • Because it’s quite cold now • https://github.com/alexclear/kaldur
  48. 48. Project Kaldur Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 48 / 51 • Is live at http://185.37.61.240:5000 • Has a TODO list on Github • Has an issues list on Github
  49. 49. Conclusions Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 49 / 51 • TeX is great! • Nim is great too! • Flamegraphs are great! • Linux is great! • Open source projects are great!
  50. 50. Questions, please? Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 50 / 51 • Why FP? • Why Linux? • ...?
  51. 51. So long, and thanks for all the fish Alex Chistyakov, DataArt Gathering and visualizing flamegraphs in realtime 51 / 51 • achistyakov@dataart.com • https://telegram.me/lhommequipleure

×