JRuby

gem management requires too much memory

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: JRuby 1.1.2
  • Fix Version/s: JRuby 1.1.3
  • Component/s: None
  • Labels:
    None
  • Environment:
    Linux satumaa 2.6.24-19-generic #1 SMP Wed Jun 4 15:10:52 UTC 2008 x86_64 GNU/Linux
  • Number of attachments :
    0

Description

Gem management (listing remote gems, installing new ones) seems to require huge amounts of memory on my configuration. Without increasing Xmx I get OOEM everytime with the following command:

erno@satumaa:~$ jruby -S gem list --remote

      • REMOTE GEMS ***

Bulk updating Gem source index for: http://gems.rubyforge.org/
Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.util.TreeMap$Values.iterator(TreeMap.java:932)
at org.jvyamlb.ScannerImpl.nextPossibleSimpleKey(ScannerImpl.java:857)
at org.jvyamlb.ScannerImpl.needMoreTokens(ScannerImpl.java:472)
at org.jvyamlb.ScannerImpl.peekToken(ScannerImpl.java:422)
...

Also with 600m:

erno@satumaa:~$ jruby -J-Xmx600m -S gem list --remote

      • REMOTE GEMS ***

Bulk updating Gem source index for: http://gems.rubyforge.org/
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at org.jruby.util.ByteList.grow(ByteList.java:635)
...

If I set the Xmx param to > 1G then the command succeeds.

Tried with JDK 6:
java version "1.6.0_10-beta"
Java(TM) SE Runtime Environment (build 1.6.0_10-beta-b14)
Java HotSpot(TM) 64-Bit Server VM (build 11.0-b11, mixed mode)

And JDK 5:
java version "1.5.0_15"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_15-b04, mixed mode)

And got OOEM on both.

JRuby:
ruby 1.8.6 (2008-05-28 rev 6586) [amd64-jruby1.1.2]

Gem Env:
erno@satumaa:~$ jruby -S gem env
RubyGems Environment:

  • RUBYGEMS VERSION: 1.1.1
  • RUBY VERSION: 1.8.6 (2008-05-28 patchlevel 6586) [java]
  • INSTALLATION DIRECTORY: /home/erno/jruby/jruby-1.1.2/lib/ruby/gems/1.8
  • RUBY EXECUTABLE: /home/erno/jruby/jruby-1.1.2/bin/jruby
  • RUBYGEMS PLATFORMS:
  • ruby
  • universal-java-1.6
  • GEM PATHS:
  • /home/erno/jruby/jruby-1.1.2/lib/ruby/gems/1.8
  • GEM CONFIGURATION:
  • :update_sources => true
  • :verbose => true
  • :benchmark => false
  • :backtrace => false
  • :bulk_threshold => 1000
  • :sources => ["http://gems.rubyforge.org", "http://gems.rubyonrails.org"]
  • REMOTE SOURCES:
  • http://gems.rubyforge.org
  • http://gems.rubyonrails.org

Activity

Hide
Vladimir Sizikov added a comment -

We'll switch to newer rubygems 1.2 soon, and as far as I can tell, the memory requirement will be significantly reduced in the new rubygems version.

Show
Vladimir Sizikov added a comment - We'll switch to newer rubygems 1.2 soon, and as far as I can tell, the memory requirement will be significantly reduced in the new rubygems version.
Hide
Vladimir Sizikov added a comment -

We upgraded to rubygems 1.2, and the memory requirements significantly reduced (40MB instead of 600MB!!!).

Show
Vladimir Sizikov added a comment - We upgraded to rubygems 1.2, and the memory requirements significantly reduced (40MB instead of 600MB!!!).
Hide
Erno Mononen added a comment -

Wow! Looking forward to 1.1.3, we'll need to upgrade the version we bundle with NB as soon as possible then.

Show
Erno Mononen added a comment - Wow! Looking forward to 1.1.3, we'll need to upgrade the version we bundle with NB as soon as possible then.

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: