Increasing Memory Usage

Hi,

I’m currently running a very simple rails (2.3.8) app using ironruby
1.0. At the moment I’m only running the app in development mode using
Webrick but I have some concerns about the amount of memory being used
by ir.exe. Each web page refresh consumes an additional 5 Mb of memory
which seems to be never released (the actually number seems to increase
with the amount of info being retrieved/displayed). Eventually my PC
(XP 32-bit) runs out of memeory and WeBrick needs to be restarted.

I’d like to know whether this is normal and whether this will continue
if I move to IIS rather than WeBrick. Or could this be a result of my
incompotence in configuring and coding my app! Any other insights would
be gratefully appreciated.

Thanks.

Hi James,

can you try (not during development, just for a test) do the same test
but
run webrick with a production RAILS_ENV ?

For Rails 2.3.8 this should be:

script/server -e production

Most of the time (most, not all :slight_smile: this is related to the development
auto-reloading feature.

hth,

– Thibaut

Thibaut,
Thanks for the reply. I was wondering whether that was the case.
I’ve tried starting in production but get the following error…

C:/ruby_iron/lib/ironruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:154:in
require': no such file to load -- activesp (MissingSourceFile) from C:/ruby_iron/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:30:inrequire’
from
C:/ruby_iron/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:30:in
require' from C:/ruby_iron/lib/ironruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:154:inrequire’
from
C:/ruby_iron/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:30:in
require' from C:/ruby_iron/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:30:inrequire’
from
C:/ruby_iron/lib/ironruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in
require' from C:/ruby_iron/lib/ironruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:490:innew_constants_in’
from
C:/ruby_iron/lib/ironruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:154:in
`require’

Any ideas?
Thanks

C:/ruby_iron/lib/ironruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:154:in

`require’: no such file to load – activesp (MissingSourceFile)

Any ideas?

Well you I’d guess you’re trying to use the activesp gem (
http://www.xaop.com/labs/activesp) ?

If so it’s apparently not available; not sure if it’s related to
ironruby or
not at this point (it could, but maybe not).

– Thibaut

Duh! Thanks Thibaut
I was reading activesp as active_support. Having one of those days.
I’d left a reference to activesp in from a previous attempt to integrate
with Sharepoint (not very succesfully - hence the move to ironruby)

I’ve now got ironruby running in production and my initial tests show
that whilst the memory usage does increase with usage, it does seem to
top out, and then stop increasing (and even descreases) and is no longer
impacting the performance as it was when running in development mode.

Thanks for your all your help.

James

On 15/12/2010, at 5:32 AM, James J. [email protected] wrote:

I’ve now got ironruby running in production and my initial tests show
that whilst the memory usage does increase with usage, it does seem to
top out, and then stop increasing (and even descreases) and is no longer
impacting the performance as it was when running in development mode.


The clr likes to use memory if it’s free. I’ve seen several distinct Wpf
and server apps climb steadily over periods as long as half an hour
before eventually leveling out around 220 Meg… I think that’s just
normal :slight_smile:

Thanks for your all your help.

Glad it worked out :slight_smile: Keep us posted on your success!

– Thibaut