---
title: "Posts"
description: "Engineering blog posts from companies, open source projects, research labs and engineers, each with a summary, topics and a difficulty level."
url: "https://swe.quest/?source=shopify&tag=memory-management"
---

# Posts

Filtered by topics: Memory management, source: Shopify Engineering.

Posts 1–5 of 5, page 1 of 1, newest first.

## 2023-04-06

- [Adventures in Garbage Collection: Improving GC Performance in our Massive Monolith](https://swe.quest/articles/adventures-in-garbage-collection-improving-gc-performance-in-our-massive-7c8cc3e83e915743.md): Shopify Engineering · 2023-04-06 · Hard · 13 min read · Memory management, Ruby, Performance engineering, Runtimes & VMs
  Shopify cut Ruby garbage-collection tail latency in its monolith by finding why major GCs were triggered, via GC.latest\_gc\_info(:major\_by), and removing each cause in turn.

## 2022-12-25

- [Optimizing Ruby’s Memory Layout: Variable Width Allocation](https://swe.quest/articles/optimizing-ruby-s-memory-layout-variable-width-allocation-7db49cee151f4d44.md): Shopify Engineering · 2022-12-25 · Hard · 13 min read · Memory management, Ruby, Runtimes & VMs, Performance engineering
  Ruby 3.2's Variable Width Allocation replaces CRuby's single 40-byte RVALUE slot with five size pools (40, 80, 160, 320 and 640 bytes) so classes, strings, arrays and objects can store their data adjacent to the object instead of in separate malloc'd memory.

## 2022-12-22

- [Year in Review 2022: Tenderlove's Ruby and Rails Reflections and Predictions](https://swe.quest/articles/year-in-review-2022-tenderlove-s-ruby-and-rails-reflections-and-predictions-d873d71ac3e91545.md): Shopify Engineering · 2022-12-22 · Easy · 8 min read · Ruby, Runtimes & VMs, Memory management, Developer tools, Compilers
  Ruby's 2022 highlights include YJIT's rewrite in Rust and its new ARM support, so \`ruby --yjit\` now runs on Apple Silicon development machines as well as production.

## 2022-11-09

- [Apollo Cache is Your Friend, If You Get To Know It](https://swe.quest/articles/apollo-cache-is-your-friend-if-you-get-to-know-it-2ce614128099fb3f.md): Shopify Engineering · 2022-11-09 · Medium · 15 min read · GraphQL, Caching, Frontend, Memory management
  Apollo Client's InMemoryCache stores a normalized, in-session representation of GraphQL data, and its object lifecycle runs through four stages: fetching (governed by fetch policies, defaulting to cache-first), normalization (splitting responses into objects keyed by \_\_typename plus id or custom keyFields into a flat hash map), updating and merging, and garbage collection and eviction.

## 2022-05-31

- [To Thread or Not to Thread: An In-Depth Look at Ruby’s Execution Models](https://swe.quest/articles/to-thread-or-not-to-thread-an-in-depth-look-at-ruby-s-execution-models-18ca691643d5cc44.md): Shopify Engineering · 2022-05-31 · Medium · 15 min read · Ruby, Concurrency, Memory management, Performance engineering, Runtimes & VMs
  Threaded Ruby servers like Puma and Sidekiq save memory over forking servers, but the gap is smaller than RSS suggests once copy-on-write sharing is measured properly with PSS and /proc/$PID/smaps\_rollup.

Same list as RSS: [https://swe.quest/feed.xml?source=shopify&tag=memory-management](https://swe.quest/feed.xml?source=shopify&tag=memory-management). Lists take `?page=`, `?per=12|24|48|96` and, on the home page, `?tag=` (up to 3), `?source=`, `?difficulty=easy|medium|hard` and `?search=`.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
