Is anyone else seeing significantly worse performance after upgrading an app to Rails3? Two datapoints after upgrading an app: * an action that averages ~550ms in Rails2.3.5 averages nearly twice as long (1020ms) in Rails3beta2. * startup time is much longer in Rails2. To demonstrate, I''m using runner: ### Rails 2.3.5: ~/projects/rails/tempo(master) $ time ruby script/runner ''puts "Rails 2 here"'' Rails 2 here *real** **0m2.366s* ### Rails 3beta2: ~/projects/rails/tempo(rails3) $ time rails runner ''puts "Rails 3 here"'' Rails 3 here *real** **0m12.053s* That''s 5x longer for Rails 3. Same app, same Ruby version (1.8.7p249). Anyone seeing something similar, or (hopefully) better? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sun, Apr 4, 2010 at 10:57 AM, Andre Lewis <andre.lewis-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Is anyone else seeing significantly worse performance after upgrading an > app to Rails3? > > Two datapoints after upgrading an app: > > * an action that averages ~550ms in Rails2.3.5 averages nearly twice as > long (1020ms) in Rails3beta2. > * startup time is much longer in Rails2. To demonstrate, I''m using runner: > > ### Rails 2.3.5: > > ~/projects/rails/tempo(master) $ time ruby script/runner ''puts "Rails 2 > here"'' > Rails 2 here > *real** **0m2.366s* > > ### Rails 3beta2: > > ~/projects/rails/tempo(rails3) $ time rails runner ''puts "Rails 3 here"'' > Rails 3 here > *real** **0m12.053s* > > That''s 5x longer for Rails 3. Same app, same Ruby version (1.8.7p249). > Anyone seeing something similar, or (hopefully) better? >Andre, Rails 3 is still currently in beta. Thus, the Rails core team are still fixing relevant bugs, cleaning up overall functionality, and the optimizations will come. Also, Rails 3 performs much better with Ruby 1.9.2 than 1.8.7 but your mileage will vary depending on your platform. In short, Rails 3 beta has been deployed into many production environments but it hasn''t been released as production ready system. The release candidates (RC) should be coming soon after the beta period which will be fully optimized for running your performance tests before we see a final release. Good luck, -Conrad ps: I''m basing this information on previous releases of Rails where we go through the following phases: alpha, beta, release candidate, and final. Thus, the software development work flow may or may not have changed for this version of Rails.> -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I believe this is a bundler issue. I had the same issue and tracked it down to Bundler.require which does the gem resolution and seems to take *forever* with it. If you run `bundle lock`, I believe it will be significantly faster again. This does all the gem resolution up front so all bundle has to do is include all the requires and go. On Apr 4, 11:16 am, Conrad Taylor <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sun, Apr 4, 2010 at 10:57 AM, Andre Lewis <andre.le...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Is anyone else seeing significantly worse performance after upgrading an > > app to Rails3? > > > Two datapoints after upgrading an app: > > > * an action that averages ~550ms in Rails2.3.5 averages nearly twice as > > long (1020ms) in Rails3beta2. > > * startup time is much longer in Rails2. To demonstrate, I''m using runner: > > > ### Rails 2.3.5: > > > ~/projects/rails/tempo(master) $ time ruby script/runner ''puts "Rails 2 > > here"'' > > Rails 2 here > > *real** **0m2.366s* > > > ### Rails 3beta2: > > > ~/projects/rails/tempo(rails3) $ time rails runner ''puts "Rails 3 here"'' > > Rails 3 here > > *real** **0m12.053s* > > > That''s 5x longer for Rails 3. Same app, same Ruby version (1.8.7p249). > > Anyone seeing something similar, or (hopefully) better? > > Andre, Rails 3 is still currently in beta. Thus, the Rails core team are > still fixing relevant bugs, cleaning up overall functionality, and > the optimizations will come. Also, Rails 3 performs much better with Ruby > 1.9.2 than 1.8.7 but your mileage will vary depending on > your platform. In short, Rails 3 beta has been deployed into many > production environments but it hasn''t been released as production > ready system. The release candidates (RC) should be coming soon after the > beta period which will be fully optimized for running your > performance tests before we see a final release. > > Good luck, > > -Conrad > > ps: I''m basing this information on previous releases of Rails where we go > through the following phases: alpha, beta, release candidate, > and final. Thus, the software development work flow may or may not have > changed for this version of Rails. > > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Ruby on Rails: Talk" group. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscrib e@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
This thread is quite interesting. I''m curious to see how all this plays out after the RCs and when optimization has been taken into account... Thanks for posting this. On Apr 4, 4:16 pm, Jacques Crocker <railsj...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I believe this is a bundler issue. I had the same issue and tracked it > down to Bundler.require which does the gem resolution and seems to > take *forever* with it. > > If you run `bundle lock`, I believe it will be significantly faster > again. This does all the gem resolution up front so all bundle has to > do is include all the requires and go. > > On Apr 4, 11:16 am, Conrad Taylor <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > On Sun, Apr 4, 2010 at 10:57 AM, Andre Lewis <andre.le...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Is anyone else seeing significantly worse performance after upgrading an > > > app to Rails3? > > > > Two datapoints after upgrading an app: > > > > * an action that averages ~550ms in Rails2.3.5 averages nearly twice as > > > long (1020ms) in Rails3beta2. > > > * startup time is much longer in Rails2. To demonstrate, I''m using runner: > > > > ### Rails 2.3.5: > > > > ~/projects/rails/tempo(master) $ time ruby script/runner ''puts "Rails 2 > > > here"'' > > > Rails 2 here > > > *real** **0m2.366s* > > > > ### Rails 3beta2: > > > > ~/projects/rails/tempo(rails3) $ time rails runner ''puts "Rails 3 here"'' > > > Rails 3 here > > > *real** **0m12.053s* > > > > That''s 5x longer for Rails 3. Same app, same Ruby version (1.8.7p249). > > > Anyone seeing something similar, or (hopefully) better? > > > Andre, Rails 3 is still currently in beta. Thus, the Rails core team are > > still fixing relevant bugs, cleaning up overall functionality, and > > the optimizations will come. Also, Rails 3 performs much better with Ruby > > 1.9.2 than 1.8.7 but your mileage will vary depending on > > your platform. In short, Rails 3 beta has been deployed into many > > production environments but it hasn''t been released as production > > ready system. The release candidates (RC) should be coming soon after the > > beta period which will be fully optimized for running your > > performance tests before we see a final release. > > > Good luck, > > > -Conrad > > > ps: I''m basing this information on previous releases of Rails where we go > > through the following phases: alpha, beta, release candidate, > > and final. Thus, the software development work flow may or may not have > > changed for this version of Rails. > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "Ruby on Rails: Talk" group. > > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm. > > > To unsubscribe from this group, send email to > > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscrib e@googlegroups.com> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Apr 4, 1:16 pm, Jacques Crocker <railsj...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> If you run `bundle lock`, I believe it will be significantly faster > again. This does all the gem resolution up front so all bundle has to > do is include all the requires and go.You''re right -- startup improves quite a bit when you bundle lock: ~/projects/rails/tempo(rails3) $ bundle lock ~/projects/rails/tempo(rails3) $ time rails runner ''puts "Rails 3 w/ bundle lock"'' Rails 3 w/bundle lock real 0m3.854s user 0m3.043s sys 0m0.535s ~/projects/rails/tempo(rails3) $ bundle unlock ~/projects/rails/tempo(rails3) $ time rails runner ''puts "Rails 3, not locked"'' Rails 3, not locked real 0m9.952s user 0m8.486s sys 0m1.181s That''s better than twice as fast with bundle lock. This project uses relatively few gems, so presumably a project with more gems would show an even greater disparity between locked and unlocked gems. Even with locked gems, Rails3b2 startup is slower than 2.3.5 startup. It''s tolerable though - about a second difference. Back to Rails 2.3.5: ~/projects/rails/tempo(master) $ time ruby script/runner ''puts "Rails 2 here"'' Rails 2 here real 0m2.668s user 0m1.882s sys 0m0.338s Jacques, thanks for the pointer! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sun, Apr 4, 2010 at 3:16 PM, Andre Lewis <andre.lewis-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Apr 4, 1:16 pm, Jacques Crocker <railsj...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > If you run `bundle lock`, I believe it will be significantly faster > > again. This does all the gem resolution up front so all bundle has to > > do is include all the requires and go. > > You''re right -- startup improves quite a bit when you bundle lock: > > ~/projects/rails/tempo(rails3) $ bundle lock > ~/projects/rails/tempo(rails3) $ time rails runner ''puts "Rails 3 w/ > bundle lock"'' > Rails 3 w/bundle lock > > real 0m3.854s > user 0m3.043s > sys 0m0.535s > > ~/projects/rails/tempo(rails3) $ bundle unlock > ~/projects/rails/tempo(rails3) $ time rails runner ''puts "Rails 3, > not locked"'' > Rails 3, not locked > > real 0m9.952s > user 0m8.486s > sys 0m1.181s > > > That''s better than twice as fast with bundle lock. This project uses > relatively few gems, so presumably a project with more gems would show > an even greater disparity between locked and unlocked gems. > > Even with locked gems, Rails3b2 startup is slower than 2.3.5 startup. > It''s tolerable though - about a second difference. Back to Rails > 2.3.5: > > ~/projects/rails/tempo(master) $ time ruby script/runner ''puts "Rails > 2 here"'' > Rails 2 here > > real 0m2.668s > user 0m1.882s > sys 0m0.338s > >Rails 3 locked/unlocked on my system takes less than .75 seconds on average. Good luck, -Conrad> Jacques, thanks for the pointer! > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Apr 4, 4:40 pm, Conrad Taylor <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Rails 3 locked/unlocked on my system takes less than .75 seconds on average.Conrad, Rails3 starts up in .75 sec for you? For comparison purposes, how many gems does our project include? What version of Ruby are you on? My project uses only a few gems -- rails, authlogic, haml, mysql, and thin. Its Ruby 1.8.7p249 on a 2.2Ghz MBP. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sun, Apr 4, 2010 at 8:39 PM, Andre Lewis <andre.lewis-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Apr 4, 4:40 pm, Conrad Taylor <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Rails 3 locked/unlocked on my system takes less than .75 seconds on > average. > > Conrad, Rails3 starts up in .75 sec for you? For comparison purposes, > how many gems does our project include? What version of Ruby are you > on? > >Andre, I have about 15 gems within my project. Also, I''m using Ruby 1.9.2 from trunk. Next, I''m using a MacPro 2.9 GHz 8-core with 32 GB RAM. Lastly, Rails 3 performs best with Ruby 1.9.2. Good luck, -Conrad> My project uses only a few gems -- rails, authlogic, haml, mysql, and > thin. Its Ruby 1.8.7p249 on a 2.2Ghz MBP. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.