Topic: Memory problem

Hi,

I am really struggle with following result..i have to explain my situation.
First, i have created small rails application which is only used to show data from table called products(nearly 11 lakhs of records in the table).Application was getting very low performance, So i decided to measure Rails's memory usage.

This was my memory usage before run application:
root@dev:free -m
             total       used       free     shared    buffers     cached
Mem:          1000        854        146          0         13        177
-/+ buffers/cache:        662        646
Swap:         1223         48       1223

I then proceeded to hit first request,free memory was reduced from 646MB to 362MB.
root@dev:free -m
             total       used       free     shared    buffers     cached
Mem:          1000        854        146          0         13        177
-/+ buffers/cache:        662        362
Swap:         1223         48       1223

When i continuously used application,free memory was reducing gradually

Used memory is not released even after the report shows result.

Free memory didn't come back to initial level like 646MB even i stopped to use my application nearly 20 min..

Please give me a solution to solve this problem..

Thanks

Last edited by willm (2010-05-11 11:26:04)

Re: Memory problem

Brent's Patches is used to reduce the memory consumption of the 1.8 series of Ruby interpreters.
"MRI 1.8.6-patchlevel287 release tarball" is available for Ruby 1.8.6 version. How to use this patch file in rails application with samples.

see  this site : http://webcache.googleusercontent.com/s … =firefox-a