How the Ruby Global VM Lock Impacts App Performance
December 13, 2024
30 min
Free
Description
Have you ever heard of Ruby's Global VM Lock? Maybe you've heard of the GIL instead? Spoiler: It's an implementation detail of Ruby that can have a big impact on latency and performance of applications. At a high-level, it prevents Ruby code across multiple threads from running in parallel, while still safely allowing concurrency. Join me as we explore what the GVL is; what it is not; and how we can use the `gvl-tracing` gem to show it in action. We’ll also look into how Ractors, M:N scheduling and fibers fit into this story. By the end of the talk you’ll have the tools to evaluate if your own applications are being impacted, as well as learn a number of do’s and don’ts of Ruby performance.