Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
Optimizing Rack and Rails applications with a just-in-time (JIT) compiler is a challenge. For example, MJIT does not speed up Rails currently. TruffleRuby tackles this challenge. We have been running the Rails Simpler Benchmarks with TruffleRuby and now achieve higher performance than any other Ruby implementation. In this talk we’ll show how we got there and what TruffleRuby optimizations are useful for Rack and Rails applications. TruffleRuby is getting ready to speed up your applications, will you try it?
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
In the video titled "Running Rack and Rails Faster with TruffleRuby," Benoit Daloze, the project lead of TruffleRuby, presents optimizations designed to enhance the performance of Rack and Rails applications using the TruffleRuby implementation. TruffleRuby is a high-performance Ruby interpreter developed by Oracle Labs, leveraging the Graal JIT compiler to significantly improve execution speed while maintaining compatibility with Ruby 2.6, including support for C extensions. Key points discussed include: - **TruffleRuby Modes**: TruffleRuby can be executed in two modes—Graal VM mode for seamless Java integration, and native mode, which compiles TruffleRuby into a single executable for faster startup and reduced memory usage. - **Compatibility and Performance**: TruffleRuby boasts a compatibility rate of 97% with Ruby specifications. It allows most existing Ruby applications to run without modifications, leveraging existing C extensions. - **Global Lock and Parallel Execution**: Unlike traditional Ruby implementations, TruffleRuby can execute Ruby code without a global lock, allowing for parallel execution. However, compatibility with C extensions may require enabling a global lock by default. Daloze discusses future plans to remove this lock as the project evolves. - **Benchmarking Setup**: The presentation showcases benchmarks created with the Real Simple Benchmark (RSB), focusing on a simple Rack and Rails application tested under controlled conditions using a popular web server (Puma). Daloze emphasizes that results may vary in real-world scenarios with multiple concurrent requests. - **Performance Results**: Benchmarks showed that: - **Rack Application**: Ruby 2.6 processed approximately 20,000 requests per second, while TruffleRuby surpassed this with over 30,000. - **Rails Application**: Ruby 2.6 achieved around 3,000 requests per second; TruffleRuby improved this performance significantly, handling about 6,000 requests per second on a single thread and increasing up to 18,000 with more threads. - **Future Prospects**: Daloze encourages developers to benchmark their applications and explore TruffleRuby, which simplifies installation through common Ruby version managers and supports both native and Graal VM modes. Additionally, he discusses ongoing efforts to ensure safe parallel execution of C extensions. In conclusion, the talk illuminates the considerable advancements TruffleRuby makes in optimizing Rack and Rails applications, showcasing its ability to outperform traditional Ruby implementations while fostering ease of adoption for developers. Benoit Daloze invites the audience to experiment with this innovative solution to enhance their applications' performance.
Suggest modifications
Cancel