Jul 09, 2024 Until recently, Ruby lacked a mechanism for detecting native-level memory leaks from within Ruby and native gems. This meant that it was hard to analyze Ruby applications that suffered from memory leaks, causing them to consume increasing amounts of memory until the system runs out and terminates the application. In this blog post, we'll be looking at the RUBY_FREE_AT_EXIT feature, which allows memory leak checkers to find memory leaks in Ruby and in native gems.
Apr 24, 2024 Ruby's garbage collector is designed to be adaptable, scaling from short Ruby scripts to running apps that serve millions of requests per second. While it's designed to be adaptable, it may not work optimally for every use case. For this reason, Ruby's garbage collector supports many parameters that can be used to tune it. However, the use of these parameters requires knowledge into how the garbage collector works on the inside. Learn how the Autotuner gem can analyze your app's traffic and provide suggestions for tuning the garbage collector.
Nov 04, 2023 Tips and tricks for the inevitable day: when the C extension crashes.
Aug 08, 2023 At Shopify, we are constantly improving the performance of Ruby for everyone. Based on analysis of and experiments on one of our largest and highest traffic apps, we found two improvements in Ruby's garbage collector that significantly improved our garbage collector performance, which in turn reduced our response times by 8%.
Jul 03, 2023 Overview of how Ruby's garbage collector works.
Jun 16, 2023 We've open sourced the definitions to build the Ruby we use at Shopify in development, testing, and production.
Apr 08, 2023 Tools and methodologies to benchmark Ruby code.
Dec 25, 2022 Learn more about Variable Width Allocation, a new feature in Ruby 3.2 that improves performance by optimizing Ruby's memory layout.
Oct 07, 2022 Practice your C extensions skills with a small project.
Mar 29, 2022 Sometimes things don't go as expected and need to raise or rescue from errors.
Dec 14, 2021 Are you a maintainer of a Ruby native extension gem? rb_gc_force_recycle will be deprecated in Ruby 3.1. Read to find how it affects you.
Dec 03, 2021 Let's look at this special type of object that only exists in C extensions called TypedData objects.
Nov 05, 2021 Let's look at the internals of ruby_memcheck, a tool to find memory leaks in native gems.
Sep 10, 2021 Finding and fixing a memory leak in Ruby strings.
Jul 25, 2021 Defining classes and modules and creating instances of classes.
Jul 08, 2021 Reading and writing instance variables, class variables, global variables, and constants through the Ruby C API.
Jun 05, 2021 The primitive data types in the Ruby C API and how to use them.
Apr 28, 2021 Calling Ruby methods in C extensions.
Apr 08, 2021 Defining Ruby methods in C extensions.
Mar 25, 2021 Let's look at how to set up and build your first Ruby C extension!
Mar 20, 2021 A series on writing your very first Ruby C extension, from scratch!
Nov 26, 2020 What's the midpoint between 0 and infinity in Ruby? It's 1.5 for some reason. What's the reason you might ask? Read on to find out.
Nov 20, 2020 A story about memory corruption inside Ruby when you create strings the wrong way.
Nov 04, 2020 There are many different ways to create Ruby strings in C, and choosing the wrong one can have catastrophic effects. So which one do you choose?
Aug 24, 2020 Overview of how Ruby's garbage collector works in Ruby 3.0.
Aug 21, 2020 Tips on development, tools, and debugging in MRI Ruby.