Memory, memory, memory

Hi guys,

I am currently “hunting” leaks in my app, and either I don’t quite
understand how ruby/rails handle memory, or there are some “features”
of Rails I am not aware of. And indeed, I found - for example - this
comment on this group (from Ezra):

You are going to see massive memory usage like this anytime you load
more then 500 -1000 activerecord objects at once. There is quite a bit
of memory overhead per AR object instantiation so ruby allocates a
bunch or ram to hold the records. Once the dataset is no longer needed
ruby doesn’t like to give ram back to the OS, instead it tends to keep
the memory around for use by the interpreter later.

Could you recommend a “reference” article, blog post or doc where this
sort of things are explained? I really don’t know how I could have
“guessed” this (and I was getting crazy trying to understand where the
memory was going).

Thanks!
Pierre

PierreW wrote:

Hi guys,

I am currently “hunting” leaks in my app, and either I don’t quite
understand how ruby/rails handle memory, or there are some “features”
of Rails I am not aware of. And indeed, I found - for example - this
comment on this group (from Ezra):

Thanks!
Pierre

The way Rails handles memory and allocation has changed with time and
versions. Your best bet is in fact to ask here… :slight_smile:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs