Collection of My Favorite Ruby and Rails Performance and Memory Articles

June 30, 2015

This is a collection of my favorite articles on Ruby and Rails performance/memory issues. I’ll be updating it from time to time.

Benchmarking / Performance


Memory – how Ruby uses memory – bloat – 36% smaller Rails memory footprint through Benchmarking

Heap dumps for debugging memory leaks

How to get process id of Rails running locally

ps -aef | grep rails

bruce 4679 4433 1 12:10 pts/17 00:01:17 /home/bruce/.rvm/rubies/ruby-2.2.1/bin/ruby bin/rails s -p 3001

bruce 5030 3378 0 12:21 pts/0 00:00:11 /home/bruce/.rvm/rubies/ruby-2.2.1/bin/ruby bin/rails s

bundle exec rbtrace -p 11697 -u 300 -e '{require "objspace"; ObjectSpace.trace_object_allocations_start; GC.start(); ObjectSpace.dump_all(output:"heap.json", "w"))}.join'