Show HN: Perforator – cluster-wide profiling tool for large data centers
78 points| BigRedEye | 1 year ago |github.com
There's a blog post about it at https://medium.com/yandex/yandexs-high-performance-profiler-....
Inspired by Google-Wide Profiling, we started continuous profiling years ago with simple tools like poormansprofiler.org. With the rise of eBPF, we came up with a simple and elegant solution providing detailed profiles without noticeable overhead. Pretty wild when you can see the guts of your production binaries in a flamegraph without them even noticing.
Some technical details:
- Our main contribution is infrastructure for continuous PGO using AutoFDO. Google and Meta have done tremendous work on building PGO infrastructure, and we made the last missing piece of the puzzle to make this work well and scalable.
- Native binaries are profiled through eh_frame analysis, interpreted/JIT-compiled languages are profiled through perf-pid.map or hardcoded structure offsets.
- We render profiles in multiple ways, the most common one is a fast implementation of FlameGraphs, rendering 1M frames in 100ms.
- We provide Helm charts to easily deploy Perforator on your k8s cluster.
- You can use Perforator in standalone mode as a replacement for perf record.
I'd love to answer your questions about the tool!
znpy|1 year ago
brancz|1 year ago
dang|1 year ago
BigRedEye|1 year ago
be-hase|1 year ago
BigRedEye|1 year ago
- Pyroscope's Java support is superior as of now because Pyroscope offloads it to the amazing async-profiler.
- Pyroscope expects native binaries to be compiled with frame pointers: https://grafana.com/docs/pyroscope/latest/configure-client/g.... This is often not the case, and that's the problem we've tried to solve with Perforator. Perforator uses .eh_frame, which is nearly universal and does not impose additional requirements on compiled binaries.
- Pyroscope symbolizes using symtab: https://grafana.com/docs/pyroscope/latest/configure-client/g.... We use DWARF/GSYM to get as correct and verbose stacks as possible (we benchmark our stacks against stacks from gdb).
- Pyroscope symbolizes profiles on an agent, while Perforator symbolizes profiles offline, greatly reducing symbolization costs and agent's overhead. It seems Pyroscope is heading toward the same architecture we use: https://github.com/grafana/pyroscope/pull/3799.
- Perforator can be (and should be!) run as a standalone replacement for perf record.
- Perforator supports sPGO profiles.
In summary, we try to implement native profiling almost perfectly. It's worth noting that Pyroscope is a mature, well-established product that integrates excellently with the Grafana ecosystem. We have just focused on different things: our focus has been on optimizing native code profiling and making it as accurate and low-overhead as possible.
eoranged|1 year ago
unknown|1 year ago
[deleted]
KingOfCoders|1 year ago
unknown|1 year ago
[deleted]