Monday, February 22, 2010

Scenes from LA Ruby Conference - 2010 - Garbage Collection and the Ruby Heap

Take Away

The traditional Ruby engine is paranoid about memory management because it has to run in so many disparate environments. This negatively impacts the garbage collection performance. If you know or can define where your Ruby installation will run, you can do optimizations that will greatly speed this process. Indeed, this is one of the benefits of Ruby Enterprise, and Ruby 1.9 accomplishes a subset of the optimizations discussed here.

Note: this session went extremely fast and I was not able to collect the notes as I wanted.


Joe Damato and Aman Gupta
@joedamato @tmm1

Garbage Collection and the Ruby Heap
  • Why GC
  • Ruby is simple and elegant
  • GC makes life easier.
  • No more memory management
    • Menory management
    • memory leaks
  • Always allocated on heap
  • Fixed size
  • sizeof(struct RVALUE) = 40

See their site to see how to optimize the GC.

Ruby memory leaks:
  • These are reference leaks
memprof - replacement for gdb.rb and bleak_house

No comments:

Post a Comment