Skip to content

Instantly share code, notes, and snippets.

@inouire
Created January 27, 2022 09:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save inouire/71a656c4a807ec0350f718df2aae9f82 to your computer and use it in GitHub Desktop.
Save inouire/71a656c4a807ec0350f718df2aae9f82 to your computer and use it in GitHub Desktop.

Ruby heap size rules of thumb

GC.stat[:heap_live_slots]
  • <1 million = don't sweat it
  • 1mil->3mil = Pretty average
  • 3mil->5mil = Typical of Big Chonker Monoliths
  • 5mil->10mil = Something probably wrong, fix to reduce RSS usage + speed up your GCs
  • 10mil+ = Nuke it from orbit, it's the only way to be sure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment