rbperf understanding ruby with bpf
play

rbperf: Understanding Ruby with BPF Javier Honduvilla Coto - PowerPoint PPT Presentation

rbperf: Understanding Ruby with BPF Javier Honduvilla Coto <javierhonduco@fb.com> October 28th-29th, 2020 Why BPF? Why BPF? - Flexibility Why BPF? - Flexibility - Low overhead Why BPF? - Flexibility - Low overhead - Continuous


  1. rbperf: Understanding Ruby with BPF Javier Honduvilla Coto <javierhonduco@fb.com> October 28th-29th, 2020

  2. Why BPF?

  3. Why BPF? - Flexibility

  4. Why BPF? - Flexibility - Low overhead

  5. Why BPF? - Flexibility - Low overhead - Continuous profiling

  6. Why BPF? - Flexibility - Low overhead - Continuous profiling - No modifications of the tracee

  7. rbperf

  8. rbperf - Profile Ruby programs

  9. rbperf - Profile Ruby programs - Trace complex Ruby programs execution

  10. rbperf – on-CPU profiling - $ rbperf record --pid=124 cpu - $ rbperf report [...]

  11. rbperf – Rails on-CPU profile

  12. rbperf – tracing write(2) calls - $ rbperf record \ --pid=124 event \ --tracepoint=syscalls:sys_enter_write - $ rbperf report [...]

  13. Architecture Driver 1. Adds info 4. Serialisation (pid to profile, thread address) ( rbperf.py ) and persistence BPF code ( bpf/rbperf.c ) 3. Receives stacktrace Bounded 2. Event loop Read frame (timer, syscall, etc) BPF tail-calls

  14. Challenges - Implementing the stack walking for a dynamic language

  15. Challenges - Implementing the stack walking for a dynamic language - Supporting multiple Ruby versions

  16. Challenges - Implementing the stack walking for a dynamic language - Supporting multiple Ruby versions - Correctness testing

  17. Challenges - Implementing the stack walking for a dynamic language - Supporting multiple Ruby versions - Correctness testing - BPF safety features

  18. Future plans - Integrate in Facebook’s profiling infra - Rewrite OSS driver program - Make the OSS version awesome - Better documentation (including how to measure overhead) - Add more output formats - Open source GDB / drgn helper - Other tools? - Containers support? - Support request-oriented workloads?

  19. Thanks! :) https://github.com/ facebookexperimental/rbperf javierhonduco@fb.com @javierhonduco

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend