Most existing Ruby stack profilers rely on the GVL, which blocks application execution and leads to high CPU usage.
SDB, on the other hand, releases the GVL when scanning Ruby thread stacks. This design minimizes its impact on Ruby applications, allowing us to increase the sampling rate from 100/s to 1000/s while still consuming very low CPU. This makes SDB a truly always-online stack profiler.
In this talk, I will explain how to implement a stack profiler without relying on the GVL, along with its benefits and challenges.