Shopify
Ruby Method Cache Tuning
What this trail covers
Shopify has evolved its approach to optimizing Ruby's performance by tuning the global method cache size. This involved identifying performance bottlenecks using system-level profiling tools like `perf` and `ftrace`, and then dynamically configuring the cache size via the `RUBY_GLOBAL_METHOD_CACHE_SIZE` environment variable. This led to significant improvements in cache hit rates and a reduction in CPU cycles spent on method lookups, demonstrating the value of system-level performance tuning for large Ruby applications.
All Shopify trails