Building an always-on (Ruby) production profiler - ivo's awfully random tech blog
22-Mar-2025 64
For the past few years, I’ve been working at Datadog on a new open-source Ruby profiler. This profiler is shipped as part of the datadog Ruby gem.
Why spend all this time and effort on building a new profiler? The key detail is that we want (and need) something that is built to be always-on in production. That translates to having really low overhead in several dimensions, including low cpu usage, low memory usage and low impact on the application’s latency, while also being something that can run for a long time unattended without impacting the application.
Doing this involves a different set of trade-offs than most profilers. For instance, the datadog profiler is able to profile cpu, wall-time, allocations, heap, the Global VM Lock, and Garbage Collection all at the same time, and while staying within the same low-overhead. It also has workarounds for a number of bugs in Ruby and 3rd-party gems, so as to make sure it never impacts any application it is added to.
Building an always-on (Ruby) production profiler - ivo's awfully random tech blog #ruby #rubydeveloper #rubyonrails #Building #always-on #(Ruby) #production #profiler #ivo's #awfully #random #blog https://rubyonrails.ba/link/building-an-always-on-ruby-production-profiler-ivo-s-awfully-random-tech-blog