On Wed, Nov 24, 2010 at 8:53 AM, Brian Candler <b.candler / pobox.com> wrote:
>> Is JRuby a higher-performance direction?
>
> I tried running Rails directly under JRuby once - it took about 600MB of
> VM for a simple app. But others have had more success, I believe.

JRuby's default settings are to allow the memory size to grow up to
512MB, which is on top of whatever native memory the JVM allocates. As
a result, heavily-hit applications can sometimes grow to that size,
since generational GC performs better with a lot of "breathing room".

Also, if you are not running threadsafe Rails, most JRuby-based
servers will spin up multiple JRuby instances in the same process. So
that 600MB app you ran was actually equivalent to an entire cluster of
C Ruby servers. We generally do much better on memory use as the
number of required instances goes up.

And finally, if you run Rails in threadsafe mode or some other
threadsafe-by-default framework like Sinatra) you can easily run an
app in a single 100-200MB process that can saturate an entire machine,
across all cores.

- Charlie