performance questions

View: New views
6 Messages — Rating Filter:   Alert me  

performance questions

by Marlon Moyer-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've recently been testing jruby vs REE/Passenger.  I've got a rails v  
2.3.2 project using mysql as a backend.  I've used jruby/mongrel and  
the glassfish gem.  I can't get it running on Glassfish server for  
some odd reason  (always give me a "Module not recognized" error when  
I deploy).

Anyway, in all my testing,  jruby is showing to be slower than REE  
running under passenger or even REE running mongrel running the site.  
When I run benchmarks like the one from Charles' blog -- the Takeuchi  
function, jruby smokes REE.

Is what I'm seeing normal?

Thanks,

--
Marlon




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: performance questions

by Joseph Athman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

How many requests are you running through to gather your numbers?  I've found that it usually takes a couple hundred requests to get JRuby warmed up enough to really start seeing benefits.  I use the Apache bench command line tool to run a few thousand requests through my application.  While the requests run you can see the moment the compiler kicks in the requests start going through so much faster.  Remember both the JVM itself and your Ruby code need to get warmed up and optimized before you will see benefits.

From my experience JRuby 1.3 and the Glassfish Gem were always faster than passenger or mongrel.

Joe

On Fri, Jun 19, 2009 at 11:33 AM, Marlon Moyer <marlon@...> wrote:
I've recently been testing jruby vs REE/Passenger.  I've got a rails v 2.3.2 project using mysql as a backend.  I've used jruby/mongrel and the glassfish gem.  I can't get it running on Glassfish server for some odd reason  (always give me a "Module not recognized" error when I deploy).

Anyway, in all my testing,  jruby is showing to be slower than REE running under passenger or even REE running mongrel running the site.  When I run benchmarks like the one from Charles' blog -- the Takeuchi function, jruby smokes REE.

Is what I'm seeing normal?

Thanks,

--
Marlon




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email




Re: performance questions

by Marlon Moyer-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for turning me on to Apache Bench...I was using httperf and getting confusing results.  I've got both the glassfish gem and glassfish server v3 installed on my system and I think me tinkering with both of them might have borked them.  After I gave up on trying to get glassfish server working, I was able to get the gem to respond roughly as fast as Ruby 1.9 running webrick.  

Now, both jRuby and Ruby1.9 are multitudes faster than Ruby1.8.  On my system though, Ruby1.9 fronted by passenger is definitely the fastest option right now.

Still, it's awesome to have all these different deployment options available!


On Jun 19, 2009, at 2:30 PM, Joseph Athman wrote:

How many requests are you running through to gather your numbers?  I've found that it usually takes a couple hundred requests to get JRuby warmed up enough to really start seeing benefits.  I use the Apache bench command line tool to run a few thousand requests through my application.  While the requests run you can see the moment the compiler kicks in the requests start going through so much faster.  Remember both the JVM itself and your Ruby code need to get warmed up and optimized before you will see benefits.

From my experience JRuby 1.3 and the Glassfish Gem were always faster than passenger or mongrel.

Joe

On Fri, Jun 19, 2009 at 11:33 AM, Marlon Moyer <marlon@...> wrote:
I've recently been testing jruby vs REE/Passenger.  I've got a rails v 2.3.2 project using mysql as a backend.  I've used jruby/mongrel and the glassfish gem.  I can't get it running on Glassfish server for some odd reason  (always give me a "Module not recognized" error when I deploy).

Anyway, in all my testing,  jruby is showing to be slower than REE running under passenger or even REE running mongrel running the site.  When I run benchmarks like the one from Charles' blog -- the Takeuchi function, jruby smokes REE.

Is what I'm seeing normal?

Thanks,

--
Marlon




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email




--
Marlon




Re: performance questions

by Charles Oliver Nutter-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Jun 22, 2009 at 9:56 AM, Marlon Moyer<marlon@...> wrote:

> Thanks for turning me on to Apache Bench...I was using httperf and getting
> confusing results.  I've got both the glassfish gem and glassfish server v3
> installed on my system and I think me tinkering with both of them might have
> borked them.  After I gave up on trying to get glassfish server working, I
> was able to get the gem to respond roughly as fast as Ruby 1.9 running
> webrick.
> Now, both jRuby and Ruby1.9 are multitudes faster than Ruby1.8.  On my
> system though, Ruby1.9 fronted by passenger is definitely the fastest option
> right now.
> Still, it's awesome to have all these different deployment options
> available!

We've really only scratched the surface of optimizing JRuby's core for
frameworks like Rails, and I suspect a lot more will come in the
future. We didn't consistently run Rails faster than MRI until the 1.2
release a few months ago, so the fact that we post consistently better
numbers now is very promising.

If you have any specific areas that appear to be slower under JRuby,
we would very much like to hear about them. But it sounds like you've
managed to get the solid performance you were hoping for, and we'll
continue to improve in the future :)

One thing that's useful to note about JRuby versus Ruby 1.9: There's
no way to run a single instance of Ruby 1.9 for an entire multi-core
box, since it does not yet run threads concurrently. So that's one
advantage we have (above and beyond the JVM and Java ecosystem).

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: performance questions

by Jacob Kessler :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Now that this thread has bubbled back up to the top, you might also try
moving away from Apache Bench towards something else (my preferred HTTP
benchmarking tool is Faban, http://faban.sunsource.net/ , but that might
well be overkill). Apache Bench has request generation happening in a
single thread, so it's possible (and likely if you are just getting a
hello-world type page) that you are actually benchmarking how fast AB
can generate new requests to be served: Not what you are interested in.

Marlon Moyer wrote:

> Thanks for turning me on to Apache Bench...I was using httperf and
> getting confusing results.  I've got both the glassfish gem and
> glassfish server v3 installed on my system and I think me tinkering
> with both of them might have borked them.  After I gave up on trying
> to get glassfish server working, I was able to get the gem to respond
> roughly as fast as Ruby 1.9 running webrick.  
>
> Now, both jRuby and Ruby1.9 are multitudes faster than Ruby1.8.  On my
> system though, Ruby1.9 fronted by passenger is definitely the fastest
> option right now.
>
> Still, it's awesome to have all these different deployment options
> available!
>
>
> On Jun 19, 2009, at 2:30 PM, Joseph Athman wrote:
>
>> How many requests are you running through to gather your numbers?  
>> I've found that it usually takes a couple hundred requests to get
>> JRuby warmed up enough to really start seeing benefits.  I use the
>> Apache bench command line tool to run a few thousand requests through
>> my application.  While the requests run you can see the moment the
>> compiler kicks in the requests start going through so much faster.  
>> Remember both the JVM itself and your Ruby code need to get warmed up
>> and optimized before you will see benefits.
>>
>> From my experience JRuby 1.3 and the Glassfish Gem were always faster
>> than passenger or mongrel.
>>
>> Joe
>>
>> On Fri, Jun 19, 2009 at 11:33 AM, Marlon Moyer <marlon@...
>> <mailto:marlon@...>> wrote:
>>
>>     I've recently been testing jruby vs REE/Passenger.  I've got a
>>     rails v 2.3.2 project using mysql as a backend.  I've used
>>     jruby/mongrel and the glassfish gem.  I can't get it running on
>>     Glassfish server for some odd reason  (always give me a "Module
>>     not recognized" error when I deploy).
>>
>>     Anyway, in all my testing,  jruby is showing to be slower than
>>     REE running under passenger or even REE running mongrel running
>>     the site.  When I run benchmarks like the one from Charles' blog
>>     -- the Takeuchi function, jruby smokes REE.
>>
>>     Is what I'm seeing normal?
>>
>>     Thanks,
>>
>>     --
>>     Marlon
>>
>>
>>
>>
>>     ---------------------------------------------------------------------
>>     To unsubscribe from this list, please visit:
>>
>>       http://xircles.codehaus.org/manage_email
>>
>>
>>
>
> --
> Marlon
>
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: performance questions

by Joseph Athman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

That's good to know.  I guess I've never used AB for a really simple app so I hadn't noticed that before.  To Marlon: also keep in mind that there are still a lot of Ruby libraries out there that don't totally work with Ruby 1.9 yet.  So it might be fast, but you might have to sort through compatibility problems.

Joe

On Wed, Jul 1, 2009 at 12:00 PM, Jacob Kessler <Jacob.Kessler@...> wrote:
Now that this thread has bubbled back up to the top, you might also try moving away from Apache Bench towards something else (my preferred HTTP benchmarking tool is Faban, http://faban.sunsource.net/ , but that might well be overkill). Apache Bench has request generation happening in a single thread, so it's possible (and likely if you are just getting a hello-world type page) that you are actually benchmarking how fast AB can generate new requests to be served: Not what you are interested in.

Marlon Moyer wrote:
Thanks for turning me on to Apache Bench...I was using httperf and getting confusing results.  I've got both the glassfish gem and glassfish server v3 installed on my system and I think me tinkering with both of them might have borked them.  After I gave up on trying to get glassfish server working, I was able to get the gem to respond roughly as fast as Ruby 1.9 running webrick.  
Now, both jRuby and Ruby1.9 are multitudes faster than Ruby1.8.  On my system though, Ruby1.9 fronted by passenger is definitely the fastest option right now.

Still, it's awesome to have all these different deployment options available!


On Jun 19, 2009, at 2:30 PM, Joseph Athman wrote:

How many requests are you running through to gather your numbers?  I've found that it usually takes a couple hundred requests to get JRuby warmed up enough to really start seeing benefits.  I use the Apache bench command line tool to run a few thousand requests through my application.  While the requests run you can see the moment the compiler kicks in the requests start going through so much faster.  Remember both the JVM itself and your Ruby code need to get warmed up and optimized before you will see benefits.

From my experience JRuby 1.3 and the Glassfish Gem were always faster than passenger or mongrel.

Joe

On Fri, Jun 19, 2009 at 11:33 AM, Marlon Moyer <marlon@... <mailto:marlon@...>> wrote:

   I've recently been testing jruby vs REE/Passenger.  I've got a
   rails v 2.3.2 project using mysql as a backend.  I've used
   jruby/mongrel and the glassfish gem.  I can't get it running on
   Glassfish server for some odd reason  (always give me a "Module
   not recognized" error when I deploy).

   Anyway, in all my testing,  jruby is showing to be slower than
   REE running under passenger or even REE running mongrel running
   the site.  When I run benchmarks like the one from Charles' blog
   -- the Takeuchi function, jruby smokes REE.

   Is what I'm seeing normal?

   Thanks,

   --
   Marlon




   ---------------------------------------------------------------------
   To unsubscribe from this list, please visit:

     http://xircles.codehaus.org/manage_email




--
Marlon





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email