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!


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()

  • 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.

  • 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()

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

  • Andy Bray

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

  • Wonder if it would benefit from the heap_info patch of lloyd’s patches:

  • 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: =========

  • 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|
    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: =========

    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)