a evolu o de profilers na netflix
play

A Evoluo de Profilers na Netflix MARTIN SPIER PERFORMANCE - PowerPoint PPT Presentation

A Evoluo de Profilers na Netflix MARTIN SPIER PERFORMANCE ARCHITECT @spiermar Performance do que? Do produto. https://www.infoq.com/br/presentations/um-dia-na-vida-de-um-arquiteto-de-performance-do-netflix Uma vez identificado? E a??


  1. A Evolução de Profilers na Netflix MARTIN SPIER PERFORMANCE ARCHITECT @spiermar

  2. Performance do que?

  3. Do produto.

  4. https://www.infoq.com/br/presentations/um-dia-na-vida-de-um-arquiteto-de-performance-do-netflix

  5. Uma vez identificado? E aí??

  6. Profiling.

  7. Mas o que são profilers?

  8. Ferramentas para análise um programa.

  9. Sampling vs. Tracing

  10. Amostras vs. Eventos

  11. Não foi sempre assim!

  12. Profiling de aplicação. Específicos para cada linguagem/stack. ● Multiplas opções. ● Fortemente integrado com a aplicação. ● Ou virtual machine. ● Sampling e/ou tracing. ● Necessita instrumentação manual ou não. ●

  13. Somente dentro da aplicação.

  14. # ./syscount -cd 5 -t 10 Tracing for 5 seconds. Top 10 only... SYSCALL COUNT gettimeofday 1009 write 3583 read 8174 openat 21550 newfstat 21558 open 21824 fchdir 43098 getdents 43106 close 43694 newfstatat 110936 https://github.com/brendangregg/perf-tools

  15. https://medium.com/netflix-techblog/java-in-flames-e763b3d32166 Kernel Java JVM GC

  16. https://medium.com/netflix-techblog/java-in-flames-e763b3d32166 Kernel Java JVM GC

  17. (EXTENDED) BERKELEY PACKET FILTER

  18. # tcpdump -ni tun0 ip and tcp and port 80 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on tun0, link-type RAW (Raw IP), capture size 262144 bytes 09:23:51.793470 IP 192.168.1.6.34512 > 100.82.154.210.80: Flags [S], seq 3536866140, win 29200, options [mss 1460,sackOK,TS val 536156148 ecr 0,nop,wscale 7], length 0 09:23:51.793583 IP 192.168.1.6.34514 > 100.82.154.210.80: Flags [S], seq 446464156, win 29200, options [mss 1460,sackOK,TS val 536156148 ecr 0,nop,wscale 7], length 0 09:23:51.863055 IP 100.82.154.210.80 > 192.168.1.6.34512: Flags [S.], seq 695094378, ack 3536866141, win 28960, options [mss 1355,sackOK,TS val 91922679 ecr 536156148,nop,wscale 8], length 0 ... ^C 26 packets captured 26 packets received by filter 0 packets dropped by kernel

  19. Brendan Gregg, 2017

  20. Mas qual a grande vantagem disto?

  21. Eficiência.

  22. # ./profile -f -p `pgrep -n func_ab` 5 func_ab;[unknown];__libc_start_main;main;func_a 2 func_ab;[unknown];__libc_start_main;main;func_b 2 func_ab;[unknown];__libc_start_main;main;func_a 11 func_ab;[unknown];__libc_start_main;main;func_b 12 func_ab;[unknown];__libc_start_main;main;func_a 23 func_ab;[unknown];__libc_start_main;main;func_b 28 func_ab;[unknown];__libc_start_main;main;func_b 57 func_ab;[unknown];__libc_start_main;main;func_a 64

  23. https://github.com/iovisor/bcc

  24. Brendan Gregg, 2018

  25. https://github.com/Netflix/vector

  26. https://github.com/spiermar/d3-flame-graph

  27. https://github.com/spiermar/d3-flame-graph

  28. https://github.com/Netflix/flamescope

  29. Brendan Gregg, 2018

  30. https://github.com/Netflix/flamescope

  31. Recap. application profilers GUIs / Vector ● ● system profilers (perf, ftrace) flame graphs (e differentials) ● ● mixed-mode profiles FlameScope (padrões) ● ● eBPF / BCC (scripts) ●

  32. Obrigado. Martin Spier martinspier.io @spiermar unchartedcorners

Recommend


More recommend