Optimizing Ruby performance: Observations from thousands of real-world services | Datadog

27-Nov-2025 586
Over the past three decades, Ruby has assumed a pivotal role in the modern web stack and become a fixture in the tool kits of countless DevOps and platform teams. Today, it is a driving force in contemporary application development, testing, automation, and CI/CD. For this blog post, we used data from our always-on continuous profiling of more than 3,000 real-world services from hundreds of organizations to track trends in Ruby usage and performance. This data sheds light on important considerations for Ruby development and points to opportunities for performance optimization that many organizations are leaving on the table. Choice of libraries is key to optimizing Ruby performance Ruby has a thriving ecosystem of libraries. On average, according to our findings, Ruby applications spend 82% of their CPU time in library code. This means that choosing the right libraries and using them efficiently should be top priorities for optimizing Ruby application performance. It’s worth emphasizing here that Ruby tends to be relatively compute-intensive. Our data backs up other findings that Ruby applications are generally less I/O-heavy, spending as much or more time on CPU as they do waiting on other services or database requests.
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