OutOfMemory Error for jruby-trunk, OS X 10.5, Java6

For those of you running on the latest and greatest jruby:

When doing some gem installs I was getting on OutOfMemory error running
on:

jruby-trunk
OS X 10.5.2
Java SE6 64-bit

Editing the bin/jruby script and bumping up Xmx378m -> Xmx512m solved
my problem.

Any of the jruby core team have ideas as to what’s eating up more
memory? Wasn’t able to reproduce in 1.1.1.

  • Larry

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Hi Larry,

At a minimum, we’ve upgraded to rubygems 1.1.1 in trunk.
That might be one reason.

Personally, I haven’t seen this problem (on Linux).
Well, I’m using x32 JDK, and that might explain why.

Thanks,
–Vladimir

On Wed, May 21, 2008 at 3:55 PM, Larry M.
[email protected] wrote:


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Wed, May 21, 2008 at 8:55 AM, Larry M.
[email protected] wrote:

Any of the jruby core team have ideas as to what’s eating up more
memory? Wasn’t able to reproduce in 1.1.1.

Hmmm, perhaps having 64bits backing primitives is pushing things a lot
higher…

This is a drag…we will probably have to up heap…

-Tom


Blog: http://www.bloglines.com/blog/ThomasEEnebo
Email: [email protected] , [email protected]


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

I seem to have the same problem as Larry every once in a while just
building
the trunk. I also use OS X 10.5.2 and Java6.

JA

On Wed, May 21, 2008 at 10:18 AM, Thomas E Enebo [email protected]

Switched back to Java 5 32-bit and reran the tests in jruby-test and
saw significantly less memory usage.

64-bit primitives look like the culprit here.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Larry M. wrote:

Any of the jruby core team have ideas as to what’s eating up more
memory? Wasn’t able to reproduce in 1.1.1.

I had this problem yesterday. Running “jruby -S gem install
activerecord” on my system resulted in this: OutOfMemoryError: Exception
in thread “main” java.lang.OutOfMemoryError: Java heap space

“jruby -J-Xmx512m -S gem install activerecord” worked.

System info
jruby -v: ruby 1.8.6 (2008-03-28 rev 6360) [amd64-jruby1.1]
uname -a: Linux asdf 2.6.24-16-generic #1 SMP Thu Apr 10 12:47:45 UTC
2008 x86_64 GNU/Linux
cat /etc/issue: Ubuntu 8.04 \n \l


T. Alexander Lystad
http://celerity.rubyforge.org/


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Thu, May 22, 2008 at 7:48 AM, Vladimir S. [email protected]
wrote:

Hi folks,

I’m still at awe about how much memory is needed just to install a
single gem (something is not right here)! Will dig a bit further.

Yeah…it is amazing…but in order to install any gem you need to
load a YAML file
which contains metadata of every gem and version of those gems for
anything
ever published to rubyforge. MRI is also grinding through a ton of
memory.

That said, we should continue to reduce the footprint of JRuby…

-Tom


Blog: http://www.bloglines.com/blog/ThomasEEnebo
Email: [email protected] , [email protected]


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Hi Tom, folks,

On Thu, May 22, 2008 at 3:14 PM, Thomas E Enebo [email protected]
wrote:

Yeah…it is amazing…but in order to install any gem you need to
load a YAML file
which contains metadata of every gem and version of those gems for anything
ever published to rubyforge. MRI is also grinding through a ton of memory.

That said, we should continue to reduce the footprint of JRuby…

Yeah, the problem is not that bad as I initially thought. For some
reason I thought that MRI
is actually consuming only about 20mb of memory when running the
rubygems.

Well, in fact, it uses up to 130Mb of memory for me. So, compared, to
about 200Mb of heap
used by JRuby (with proper GC set) - it’s not that bad!

Thanks,
–Vladimir


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Hi folks,

I’ve done a bit of profiling today on my PC (java x32, Core2Duo with
Windows), and here are the results:

  1. jruby -S gem install activerecord (from scratch) reaches a heap
    size of 350Mb. (Very close to our heap max size!)

  2. Using newer GC that can take advantage of multi-core systems:
    jruby -J-XX:+UseParallelGC -S gem install activerecord

I can see that the heap is about 250MB (which is a whopping 100mb
smaller than in the first case!)

I’m still at awe about how much memory is needed just to install a
single gem (something is not right here)! Will dig a bit further.

Thanks,
–Vladimir

On Thu, May 22, 2008 at 10:13 AM, T. Alexander Lystad
[email protected] wrote:

“jruby -J-Xmx512m -S gem install activerecord” worked.
http://celerity.rubyforge.org/


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

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