Ruby "Thread Contention" is simply GVL Queuing | Island94.org

07-Feb-2025 104
There’s been a ton of fantastic posts from Jean Boussier recently explaining application shapes, instrumenting the GVL (Global VM Lock), and thoughts on removing the GVL. They’re great reads! For the longest time, I’ve misunderstood the phrase “thread contention”. It’s a little embarrassing that given I’m the author of GoodJob (👍) and a maintainer of Concurrent Ruby and have been doing Ruby and Rails stuff for more than a decade. But true. I’ve been reading about thread contention for quite a while. I was probably initially introduced to thread contention in Nate Berkopec’s Speedshop blog. Thread contention came to the front of my mind from Maciej Mensfeld’s post about the problems with Thread.pass The hot discussion about Rail’s default puma thread count. Ivo Anjo did a fantastic deep dive into the GVL.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle