Forum: IronRuby Increasing Memory Usage

Posted by James Jefferson (jeffej)
on 2010-12-14 12:25
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.
Posted by Thibaut Barrère (thbar)
on 2010-12-14 14:49
(Received via mailing list)
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 :-) this is related to the development
auto-reloading feature.

hth,

-- Thibaut
Posted by James Jefferson (jeffej)
on 2010-12-14 15:15
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:in 
`require'
        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:in 
`require'
        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:in 
`require'
        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:in 
`new_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
Posted by Thibaut Barrère (thbar)
on 2010-12-14 16:22
(Received via mailing list)
>
>
> 
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
Posted by James Jefferson (jeffej)
on 2010-12-14 17:32
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
Posted by Orion Edwards (Guest)
on 2010-12-15 10:09
(Received via mailing list)
On 15/12/2010, at 5:32 AM, James Jefferson <lists@ruby-forum.com> 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 :-)
Posted by Thibaut Barrère (thbar)
on 2010-12-15 10:58
(Received via mailing list)
>
> Thanks for your all your help.
>

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

-- Thibaut
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.