Phusion white papers Phusion overview

Phusion Blog

Ruby Enterprise Edition 1.8.6-20090113 released, thanks to sponsors!

By Hongli Lai on January 13th, 2009

What is Ruby Enterprise Edition?

Ruby Enterprise Edition (REE) is a server-oriented distribution of the official Ruby interpreter, and includes various additional enhancements. REE’s main benefits are the ability to reduce Ruby on Rails applications’ memory usage by 33% on average, the ability to increase applications’ performance and the inclusion of various analysis and debugging features. The lower memory usage and increased performance are possible because REE includes – among other enhancements – a copy-on-write friendly garbage collector, as well as an improved memory allocator. REE has been out for several months now and is already used by many high-profile websites and organizations, such as New York Times, Shopify and 37signals.

“We switched to enterprise ruby to get the full benefit of the [copy-on-write] memory characteristics and we can absolutely confirm the memory savings of 30% some others have reported. This is many thousand dollars of savings even at today’s hardware prices.”
Tobias Lütke (Shopify)

And just like Phusion Passenger, Ruby Enterprise Edition is 100% open source.

Sponsorship results

We are pleased to announce REE version 1.8.6-20090113 to the world. This version is sponsored by the following people and organizations:

We were pleasantly surprised with the speed at which the second sponsorship campaign’s goal was reached. Thank you sponsors!

Changes

The sponsored improvements are:

  • Tcmalloc support for 64-bit operating systems.
    
REE’s copy-on-write optimizations work on 64-bit operating systems. But the improved memory allocator that REE includes, tcmalloc, was disabled on 64-bit platforms for various reasons. It would be more efficient if tcmalloc is enabled on 64-bit platforms because it would allow one to save more memory and to gain more performance. In this release, tcmalloc now properly integrates into Ruby on 64-bit platform.
  • Ported and incorporated the RubyProf GC patches.
    
These patches add the ability to measure the number of objects in Ruby and to measure the amount of allocated memory, which is very useful in various debugging scenarios. RubyProf automatically uses this functionality for GC profiling if the Ruby interpreter is properly patched.

  • Better documentation.

    A lot of cool new features, e.g. caller_for_all_threads and the RailsBench patches, had been added to REE lately. These features aren’t very well documented, and the existing documentation was scattered all over the Internet. We’ve written a unified manual which teaches developers how to effectively use these new REE features to debug applications.

We’ve also added a number of improvements which are not sponsored:

Fixed –no-tcmalloc on OS X
Running the installer with –no-tcmalloc didn’t work on OS X. This has been fixed.
Fixed more bugs in GNU readline integration on OS X
Requiring “irb/completion” causes REE to crash when running on OS X. This has been fixed. Also, GNU readline has been added as dependency, so the installer will now check for it.
Pass ‘-r’ to ‘gem install’ when installing gems
The REE installer will now pass ‘-r’ when installing gems. This fixes gem installation for people who have specified ‘-l’ in their ~/.gemrc.
Fixed a crash when using REE to install REE
This is caused by the fact that we overwrote tcmalloc without unlinking it first. This has been fixed.
Fixed Debian package
The Debian package for the previous release contains a mysterious folder called ‘/home/hongli’. This bug has been fixed.

Download & upgrade

To install Ruby Enterprise Edition, please visit the download page. To upgrade from a previous version, simply install into the same prefix that you installed to last time. Please also refer to the documentation for upgrade instructions.

  • Pingback: Ruby Enterprise Edition 1.8.6-20090113()

  • http://www.weisserth.eu Tobias Weisserth

    It still doesn’t compile on Mac OS X 10.4, due to a bug I already reported:

    /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: unknown flag: -rpath

    The “-rpath” flag was introduced with Leopard.

  • http://devver.net/blog Dan Mayer

    Is anyone working on rewriterule? Is there a way to sponsor a feature?

    right now I don’t know how to use passenger because we forward our blog to wordpress
    #blog settings to let apache server wordpress
    #this rewrite rule needs to be before merb rewrites
    Alias /blog /var/www/devver/blog
    RewriteRule ^/blog – [QSA,L]

    Keep up the good work I love passenger and REE. Both are incredibly useful.

  • Pingback: Jeffrey Gelens()

  • Pingback: RubyRuby Enterprise Edition 1.8.6-20090113 - Another update | The Workshop()

  • http://undefinedrange.com/ Vincent Woo

    @Dan: I noticed an Apache directive in the Passenger documentation that just might be what you’re looking for.

    http://www.modrails.com/documentation/Users%20guide.html#RailsAllowModRewrite

  • Andy Bray

    Great work. This is a great release. Im sure Engine Yard will be happy with the Tcmalloc support for 64-bit.

  • http://betterlogic.com/roger roger

    Wonder if it would benefit from the heap_info patch of lloyd’s patches:
    http://lloydforge.org/projects/misc/
    Cheers!
    -=r

  • Evgeniy

    readline error on RHEL5 64 bit

    we have model object Event

    run script/console
    try auto-completion (TAB – read TAB where it says f***)

    [super@sql1 super]$ ./script/console
    Loading production environment (Rails 2.1.2)
    >> Event.f*** glibc detected *** irb: double free or corruption (!prev): 0x000000001cfbbcb0 ***
    ======= Backtrace: =========
    /lib64/libc.so.6[0x33e6a71834]
    /lib64/libc.so.6(cfree+0x8c)[0x33e6a74e7c]
    /usr/lib64/libreadline.so.5[0x33e8219925]
    /usr/lib64/libreadline.so.5(rl_complete_internal+0x10b)[0x33e821b41b]
    /usr/lib64/libreadline.so.5(_rl_dispatch_subseq+0xcf)[0x33e821434f]
    /usr/lib64/libreadline.so.5(readline_internal_char+0x9b)[0x33e8214a5b]
    /usr/lib64/libreadline.so.5(readline+0x55)[0x33e8214e65]
    irb(rb_protect+0x111)[0x412af1]
    /opt/ruby-enterprise-1.8.6-20090113/lib/ruby/1.8/x86_64-linux/readline.so[0x2b6b0644d36e]

  • Evgeniy

    64 bit RHEL 5 / CentOS 5
    simple script

    #!/usr/bin/env ruby
    require ‘readline’

    include Readline

    complete_me = {
    ‘get’ => ‘You selected Get’,
    ‘put’ => ‘You selected Put’
    }

    loop do

    Readline.completion_proc = proc { |line|
    complete_me.keys.grep(/^#{Regexp.quote(line)}/)
    }
    meth = readline(“Method: “, true)
    break unless meth
    meth = meth.strip
    next if meth.empty?
    puts complete_me[meth]

    end # begin

    when run on ruby-enterprise-1.8.6-20080810
    works fine (pressing tab doesn’t crash)

    when running on ruby-enterprise-1.8.6-20090113
    crashes (not all the time)

    ruby readline-bug.rb
    Method: *** glibc detected *** ruby: free(): invalid next size (fast): 0x000000000eafb1f0 ***
    ======= Backtrace: =========
    /lib64/libc.so.6[0x33e6a71834]
    /lib64/libc.so.6(cfree+0x8c)[0x33e6a74e7c]
    /usr/lib64/libreadline.so.5[0x33e8219925]
    /usr/lib64/libreadline.so.5(rl_complete_internal+0x10b)[0x33e821b41b]
    /usr/lib64/libreadline.so.5(_rl_dispatch_subseq+0xcf)[0x33e821434f]
    /usr/lib64/libreadline.so.5(readline_internal_char+0x9b)[0x33e8214a5b]
    /usr/lib64/libreadline.so.5(readline+0x55)[0x33e8214e65]
    ruby(rb_protect+0x111)[0x412af1]
    /opt/ruby-enterprise-1.8.6-20090113/lib/ruby/1.8/x86_64-linux/readline.so[0x2b648e1a636e]

    because it happens not all the time, and the only other activity at this time might be from GC – I think either GC is too agressive, or GC reference integrity is broken (reference counter =>
    GC frees an memory that still used or readline.c binding has a memory bug)