Hello guys. Recently I have been developing a website using Rails. I come from a PHP background, a very experienced one to say the least, and have been developing for quite some time now. In PHP I have a framework quite like Rails, although at the time of writing it I had no clue Rails even existed. It shares the same basic concept of routing and a strong database back-end. Here is a comparison of two sites I have developed, the second one (Rails one) still under construction: http://countermail.com/index.php?mod=core - PHP http://www.joshgilman.com/articles/index - Rails I use standard 4MB/s cable connection via a wireless router and the PHP website takes about 1-2 seconds to load whereas the Rails website takes a good 6-7 seconds to load. This speed is really killing me, and I''m not sure it''s entirely Rails fault but rather part of my host''s fault. My question is what''s a good host to have a Rails application on? Is this the normal speed I should expect from a rails application? I would love to continue with this application but with speeds like this I am already considering switching over to PHP. If anyone can make some suggestions to help me out here I would be very greatful. Thank you. Cheers, Josh -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I had a similar problem when I cut across to Ruby. I hadn''t realized about preloading an application with webrick or mongrel. On Jan 31, 1:41 pm, Josh Gilman <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hello guys. > > Recently I have been developing a website using Rails. I come from a PHP > background, a very experienced one to say the least, and have been > developing for quite some time now. In PHP I have a framework quite like > Rails, although at the time of writing it I had no clue Rails even > existed. It shares the same basic concept of routing and a strong > database back-end. Here is a comparison of two sites I have developed, > the second one (Rails one) still under construction: > > http://countermail.com/index.php?mod=core- PHPhttp://www.joshgilman.com/articles/index- Rails > > I use standard 4MB/s cable connection via a wireless router and the PHP > website takes about 1-2 seconds to load whereas the Rails website takes > a good 6-7 seconds to load. This speed is really killing me, and I''m not > sure it''s entirely Rails fault but rather part of my host''s fault. My > question is what''s a good host to have a Rails application on? Is this > the normal speed I should expect from a rails application? I would love > to continue with this application but with speeds like this I am already > considering switching over to PHP. > > If anyone can make some suggestions to help me out here I would be very > greatful. Thank you. > > Cheers, > Josh > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
brabuhr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Jan-31 02:50 UTC
Re: The speed of Rails
On 1/30/07, Josh Gilman <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> http://countermail.com/index.php?mod=core - PHP > http://www.joshgilman.com/articles/index - Rails > > I use standard 4MB/s cable connection via a wireless router and the PHP > website takes about 1-2 seconds to load whereas the Rails website takes > a good 6-7 seconds to load. This speed is really killing me, and I''m not > sure it''s entirely Rails fault but rather part of my host''s fault. My > question is what''s a good host to have a Rails application on? Is this > the normal speed I should expect from a rails application? I would love > to continue with this application but with speeds like this I am already > considering switching over to PHP.Some standard questions: Are you running production or development mode? How is the app deployed (Webrick, Mongrel, FastCGI, CGI)? --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
unknown wrote:> On 1/30/07, Josh Gilman <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >> considering switching over to PHP. > Some standard questions: > > Are you running production or development mode? > How is the app deployed (Webrick, Mongrel, FastCGI, CGI)?I''m running in development and I believe it''s deployed in FastCGI, but I''m not sure, my host does not explicitely say. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> I''m running in development and I believe it''s deployed in FastCGI, but > I''m not sure, my host does not explicitely say.So you realize that development is exponentially slower than production mode? For one thing, all files are re-loaded at every single request (handy in dev mode so you don''t have to restart anything, but _slow_). There''s no caching. There''s a lot more logging which slows things down. And other, slower differences I''m sure I''m forgetting. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Josh Gilman wrote:> unknown wrote: >> On 1/30/07, Josh Gilman <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >>> considering switching over to PHP. >> Some standard questions: >> >> Are you running production or development mode? >> How is the app deployed (Webrick, Mongrel, FastCGI, CGI)? > > I''m running in development and I believe it''s deployed in FastCGI, but > I''m not sure, my host does not explicitely say.Switch to production mode and you should see a very large improvement. In development all your models and controllers are reloaded on each request, and in production the are read on bootup of the server and then no more. You should expect slowness in development mode due the large number of files in a rails aplication. But in production the speed should be comparable to PHP. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Alex Wayne wrote:> Josh Gilman wrote: >> unknown wrote: >>> On 1/30/07, Josh Gilman <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >>>> considering switching over to PHP. >>> Some standard questions: >>> >>> Are you running production or development mode? >>> How is the app deployed (Webrick, Mongrel, FastCGI, CGI)? >> >> I''m running in development and I believe it''s deployed in FastCGI, but >> I''m not sure, my host does not explicitely say. > > Switch to production mode and you should see a very large improvement. > In development all your models and controllers are reloaded on each > request, and in production the are read on bootup of the server and then > no more. > > You should expect slowness in development mode due the large number of > files in a rails aplication. But in production the speed should be > comparable to PHP.How can you ensure it''s in production? I changed config/environment.rb and uncommented: ENV[''RAILS_ENV''] ||= ''production'' I notice a little bit of difference, still a little slow though for only loading a few articles. Right now I am running off of NetFirms which is pretty crappy, can someone make any suggestions for a host geared towards Rails applications? That''s not overly priced, I am very limited on money right now. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Josh Gilman wrote:> can someone make any suggestions for a host geared > towards Rails applications? That''s not overly priced, I am very limited > on money right now.http://railsmachine.com/ http://textdrive.com -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Try RailsPlayground. You will need to know more about your deployment before you can really figure out whether you have a performance problem. John Burm wrote:> > > unknown wrote: >> On 1/30/07, Josh Gilman <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >>> considering switching over to PHP. >> Some standard questions: >> >> Are you running production or development mode? >> How is the app deployed (Webrick, Mongrel, FastCGI, CGI)? > > I''m running in development and I believe it''s deployed in FastCGI, but > I''m not sure, my host does not explicitely say. > > -- > Posted via http://www.ruby-forum.com/. > > > > >-- View this message in context: http://www.nabble.com/-Rails--The-speed-of-Rails-tf3145992.html#a8723172 Sent from the RubyOnRails Users mailing list archive at Nabble.com. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Alex Wayne wrote:> Josh Gilman wrote: >> can someone make any suggestions for a host geared >> towards Rails applications? That''s not overly priced, I am very limited >> on money right now. > > http://railsmachine.com/ > http://textdrive.comrailsmachine is too expensive and I heard textdrive sucked beyond belief. I have been doing my own research and it doesn''t seem like there is any real good ones out there that are not for enterprise applications and charge you enterprise prices. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Steve Ross wrote:> Try RailsPlayground. You will need to know more about your deployment > before > you can really figure out whether you have a performance problem. > > > John Burm wrote: >> I''m running in development and I believe it''s deployed in FastCGI, but >> I''m not sure, my host does not explicitely say. >> >> -- >> Posted via http://www.ruby-forum.com/. >> >> > >> >> > > -- > View this message in context: > http://www.nabble.com/-Rails--The-speed-of-Rails-tf3145992.html#a8723172 > Sent from the RubyOnRails Users mailing list archive at Nabble.com.Now here''s my question. They offer two plans, one for $60 a month but no support for lighttpd/mongrel servers and then one for $108 a month with support for lighttpd/mongrel servers. Is it worth it to go all the way to $108 for the servers for pay $60 and go with fastcgi? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Take a look at a2hosting.com. I''ve been using them for about 6 months now for a dev environment at < $10/month . Excellent support. Very good for the $, IMO. hth, Bill ----- Original Message ----- From: "Josh Gilman" <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> To: <rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Sent: Tuesday, January 30, 2007 11:04 PM Subject: [Rails] Re: The speed of Rails> > Alex Wayne wrote: >> Josh Gilman wrote: >>> can someone make any suggestions for a host geared >>> towards Rails applications? That''s not overly priced, I am very limited >>> on money right now. >> >> http://railsmachine.com/ >> http://textdrive.com > > railsmachine is too expensive and I heard textdrive sucked beyond > belief. I have been doing my own research and it doesn''t seem like there > is any real good ones out there that are not for enterprise applications > and charge you enterprise prices. > > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
You haven''t really specified what you are deploying, how much traffic you expect and so on. Planet Argon offers a very nice shared hosting environment at reasonable rates, but don''t expect to run Amazon-like traffic through it. RailsMachine and EngineYard have what appear to be great plans for larger-scale apps or ones where you need guaranteed cycles. I''ve read that they''re worth what they charge. The real question is this: Are you a dev who''s test-driving rails to see how it works ($5 developer plan) or are you pushing something live tomorrow that has to serve hundreds of thousands of pages a day without breaking a sweat? Rails hosting is not as commoditized as PHP and Perl (or any Windows) hosting are. Deploying a Rails app requires more from your host and more from you. If you are in development mode, it might be worth your while to get a bit of dev space on one of the less expensive hosts to try different deployments. Hope this helps. John Burm wrote:> > > Steve Ross wrote: >> Try RailsPlayground. You will need to know more about your deployment >> before >> you can really figure out whether you have a performance problem. >> >> >> John Burm wrote: >>> I''m running in development and I believe it''s deployed in FastCGI, but >>> I''m not sure, my host does not explicitely say. >>> >>> -- >>> Posted via http://www.ruby-forum.com/. >>> >>> > >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/-Rails--The-speed-of-Rails-tf3145992.html#a8723172 >> Sent from the RubyOnRails Users mailing list archive at Nabble.com. > > Now here''s my question. They offer two plans, one for $60 a month but no > support for lighttpd/mongrel servers and then one for $108 a month with > support for lighttpd/mongrel servers. Is it worth it to go all the way > to $108 for the servers for pay $60 and go with fastcgi? > > -- > Posted via http://www.ruby-forum.com/. > > > > >-- View this message in context: http://www.nabble.com/-Rails--The-speed-of-Rails-tf3145992.html#a8724156 Sent from the RubyOnRails Users mailing list archive at Nabble.com. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
For a rundown of a few Rails hosting companies check out http://www.railshostinginfo.com . There you can compare and review several companies and you can also narrow your search by price. Kind regards, Nick -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
If you can, splurge for a VPS at www.slicehost.com . Instead of getting a $10/month shared hosting account, skip a few latte''s and get a 256MB slice for $20/month, can''t beat it. On Jan 31, 5:54 am, Josh Gilman <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Alex Wayne wrote: > > Josh Gilman wrote: > >> unknown wrote: > >>> On 1/30/07, Josh Gilman <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > >>>> considering switching over to PHP. > >>> Some standard questions: > > >>> Are you running production or development mode? > >>> How is the app deployed (Webrick, Mongrel, FastCGI, CGI)? > > >> I''m running in development and I believe it''s deployed in FastCGI, but > >> I''m not sure, my host does not explicitely say. > > > Switch to production mode and you should see a very large improvement. > > In development all your models and controllers are reloaded on each > > request, and in production the are read on bootup of the server and then > > no more. > > > You should expect slowness in development mode due the large number of > > files in a rails aplication. But in production the speed should be > > comparable to PHP. > > How can you ensure it''s in production? I changed config/environment.rb > and uncommented: > > ENV[''RAILS_ENV''] ||= ''production'' > > I notice a little bit of difference, still a little slow though for only > loading a few articles. Right now I am running off of NetFirms which is > pretty crappy, can someone make any suggestions for a host geared > towards Rails applications? That''s not overly priced, I am very limited > on money right now. > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Since you had your app in ''development'' mode, maybe a good question is whether you are actually wanting to deploy this app or are still ''developing'' it, or even just playing with Rails to learn. Unless you are actually ready to publicly deploy - perhaps it would be cheapest, fastest and best to simply ''host'' it on your local machine. I personally have had good experiences with ServInt for VPS hosting, their plans start a little under $50 for a fully-managed server. Set it up with LiteSpeed''s free server which has built in support for RoR and you have a fairly easy to setup, easy to maintain server configuration that still gives you cPanel if you should need such a thing. -- JP On Jan 31, 12:04 am, Josh Gilman <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> railsmachine is too expensive and I heard textdrive sucked beyond > belief. I have been doing my own research and it doesn''t seem like there > is any real good ones out there that are not for enterprise applications > and charge you enterprise prices.--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I am still kind of "playing" around with Rails, although I have plans of deploying the current website I am creating once I finish it. I don''t expect too much trafic, but I mean there are going to be a lot of people searching through hundreds of articles and I don''t want it taking 10-15 seconds every search. It''s not really traffic I am worried about, just the speed of the things the site is doing. This will me my first rails application deployed. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 1/31/07, Josh Gilman <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > I am still kind of "playing" around with Rails, although I have plans of > deploying the current website I am creating once I finish it. I don''t > expect too much trafic, but I mean there are going to be a lot of people > searching through hundreds of articles and I don''t want it taking 10-15 > seconds every search. It''s not really traffic I am worried about, just > the speed of the things the site is doing. This will me my first rails > application deployed.Even development mode shouldn''t be that slow, unless you just have a lot of queries on that page. If so, running on mongrel/fastcgi in production won''t help much. -- Rick Olson http://weblog.techno-weenie.net http://mephistoblog.com --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
signalus-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Jan-31 15:55 UTC
Re: The speed of Rails
On Jan 30, 8:56 pm, Alex Wayne <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Josh Gilman wrote: > > can someone make any suggestions for a host geared > > towards Rails applications? That''s not overly priced, I am very limited > > on money right now. > > http://railsmachine.com/http://textdrive.com > > -- > Posted viahttp://www.ruby-forum.com/.I would suggest http://www.railshosting.org/#free_rails_hosting to get a decent free account while you are testing the waters --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
signalus-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> On Jan 30, 8:56 pm, Alex Wayne <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: >> Josh Gilman wrote: >> > can someone make any suggestions for a host geared >> > towards Rails applications? That''s not overly priced, I am very limited >> > on money right now. >> >> http://railsmachine.com/http://textdrive.com >> >> -- >> Posted viahttp://www.ruby-forum.com/. > > > I would suggest http://www.railshosting.org/#free_rails_hosting to get > a decent free account while you are testing the watersWhat I am really looking for is a host to use once I have the application finished, I can run and test the application on my computer, so that''s not a problem. I need a reliable host that I don''t need to worry about switching from whenever I do start getting bigger traffic. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 1/31/07, Rick Olson <technoweenie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > On 1/31/07, Josh Gilman <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > > > I am still kind of "playing" around with Rails, although I have plans of > > deploying the current website I am creating once I finish it. I don''t > > expect too much trafic, but I mean there are going to be a lot of people > > searching through hundreds of articles and I don''t want it taking 10-15 > > seconds every search. It''s not really traffic I am worried about, just > > the speed of the things the site is doing. This will me my first rails > > application deployed. > > Even development mode shouldn''t be that slow, unless you just have a > lot of queries on that page. If so, running on mongrel/fastcgi in > production won''t help much. >I''m with Rick here; there''s probably a better way to do whatever it is you''re trying to do. Is the site this slow during development as well? All of it, or just a single action? Isak> > -- > Rick Olson > http://weblog.techno-weenie.net > http://mephistoblog.com > > > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Isak Hansen wrote:> On 1/31/07, Rick Olson <technoweenie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> Even development mode shouldn''t be that slow, unless you just have a >> lot of queries on that page. If so, running on mongrel/fastcgi in >> production won''t help much. >> > > I''m with Rick here; there''s probably a better way to do whatever it is > you''re trying to do. > > Is the site this slow during development as well? All of it, or just a > single action? > > > IsakOn my computer running on a Webrick server it''s lightning fast. There is no lag and it runs perfectly fine. I''m am not sending many queries. The most cluttered page would probably be the display article page where I query for the article information and then query for all the comments that belong to that article, but those are the only 2 queries that I am sending. I don''t understand why that would be so laggy, my basic code looks like: @article = Article.find(params[:id]) # Display article information # render(:partial, :article_comments, @article.comment) # Display the comments Note the above was written by hand so I''m sure it contains mistakes but you get the general idea. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Josh Gilman wrote:> I am still kind of "playing" around with Rails, although I have plans of > deploying the current website I am creating once I finish it. I don''t > expect too much trafic, but I mean there are going to be a lot of people > searching through hundreds of articles and I don''t want it taking 10-15 > seconds every search. It''s not really traffic I am worried about, just > the speed of the things the site is doing. This will me my first rails > application deployed.I''m sure you''ve thought of it, but the only time I''ve had a slow system (without heavy traffic), is improper use of the joins, or not using eager loading. For Example, Myobject.find(:all,:include=>''childtable'') One of the big things, is that rails makes it easy to do something this <%=Myobject.childtable.full_name-%> Doing that 500 times in a view, will make 500 database calls unles you use eager loading. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> > What I am really looking for is a host to use once I have the > application finished, I can run and test the application on my computer, > so that''s not a problem. I need a reliable host that I don''t need to > worry about switching from whenever I do start getting bigger traffic.You could try dreamhost.com - with a coupon you might just spend $10 for the first year. Search google from dreamhost coupon. There is a dreamhost wiki with Rails deployment tips. Stephan -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
David Harkness wrote:> Josh Gilman wrote: >> I am still kind of "playing" around with Rails, although I have plans of >> deploying the current website I am creating once I finish it. I don''t >> expect too much trafic, but I mean there are going to be a lot of people >> searching through hundreds of articles and I don''t want it taking 10-15 >> seconds every search. It''s not really traffic I am worried about, just >> the speed of the things the site is doing. This will me my first rails >> application deployed. > > I''m sure you''ve thought of it, but the only time I''ve had a slow system > (without heavy traffic), is improper use of the joins, or not using > eager loading. > > > For Example, > > Myobject.find(:all,:include=>''childtable'') > > One of the big things, is that rails makes it easy to do something this > > <%=Myobject.childtable.full_name-%> > Doing that 500 times in a view, will make 500 database calls unles you > use eager loading.What does: Myobject.childtable.each {} Do? I thought it would just query the database once, grab all the results, and loop through them. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
>> I''m sure you''ve thought of it, but the only time I''ve had a slow system >> (without heavy traffic), is improper use of the joins, or not using >> eager loading. >> >> >> For Example, >> >> Myobject.find(:all,:include=>''childtable'') >> >> One of the big things, is that rails makes it easy to do something this >> >> <%=Myobject.childtable.full_name-%> >> Doing that 500 times in a view, will make 500 database calls unles you >> use eager loading. > > What does: > > Myobject.childtable.each {} > > Do? I thought it would just query the database once, grab all the > results, and loop through them.Right, but that''s not exactly what the parent meant. Consider... model... Person has_one Address controller.... @people = Person.find(:all) view.... <% @people.each do |person| %> <%= person.name %> lives in <%= person.address.city %> <% end %> If you''ve got 500 people, you''re going ot have 501 database queries. One to get all the people, and one to get each person''s address. Change the controller to... @people = Person.find(:all, :include => [:address]) And now Rails does a join query so you only have one database query. -philip --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I keep thinking it has to be simpler than an unoptimized database query. The OP described his application and it seemed like a fairly straightforward posts/comments kind of thing. The most glaring thing that can bring a Rails app to its knees is deploying as CGI and not FCGI. Could this be it? Ok, let''s presume it was deployed as FCGI or Mongrel. What do the logs look like for a slow page? That would at least provide a hint about whether the database was the bottleneck. Finally, how about creating a dirt-simple action: def dirt_simple @post = Post.find :first end and a dirt simple view <%= @post[:id] %> How fast is that? If it''s not fast, then you can take your focus off the database and point it back to your server config. Here''s the deal. It''s fast on the local machine under WEBrick. Ok, that''s understandable -- long-running process, no network overhead, but wait! The database on the local machine should be *slower*. So, as I continue attempt inference from this thread, it tells me that the performance problem is in the server on the remote host or the host itself. My first guess was that the deployment was straight CGI and that''s what was causing the holdup. If I''m not right, it''ll show up in the logs. --steve Philip Hallstrom-8 wrote:> > >>> I''m sure you''ve thought of it, but the only time I''ve had a slow system >>> (without heavy traffic), is improper use of the joins, or not using >>> eager loading. >>> >>> >>> For Example, >>> >>> Myobject.find(:all,:include=>''childtable'') >>> >>> One of the big things, is that rails makes it easy to do something this >>> >>> <%=Myobject.childtable.full_name-%> >>> Doing that 500 times in a view, will make 500 database calls unles you >>> use eager loading. >> >> What does: >> >> Myobject.childtable.each {} >> >> Do? I thought it would just query the database once, grab all the >> results, and loop through them. > > Right, but that''s not exactly what the parent meant. Consider... > > model... Person has_one Address > > > controller.... @people = Person.find(:all) > > view.... > > <% @people.each do |person| %> > <%= person.name %> lives in <%= person.address.city %> > <% end %> > > If you''ve got 500 people, you''re going ot have 501 database queries. One > to get all the people, and one to get each person''s address. > > Change the controller to... @people = Person.find(:all, > :include => [:address]) > > And now Rails does a join query so you only have one database query. > > -philip > > > > >-- View this message in context: http://www.nabble.com/-Rails--The-speed-of-Rails-tf3145992.html#a8742978 Sent from the RubyOnRails Users mailing list archive at Nabble.com. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Steve Ross wrote:> I keep thinking it has to be simpler than an unoptimized database query. > The > OP described his application and it seemed like a fairly straightforward > posts/comments kind of thing. The most glaring thing that can bring a > Rails > app to its knees is deploying as CGI and not FCGI. Could this be it? > > Ok, let''s presume it was deployed as FCGI or Mongrel. What do the logs > look > like for a slow page? That would at least provide a hint about whether > the > database was the bottleneck. > > Finally, how about creating a dirt-simple action: > > def dirt_simple > @post = Post.find :first > end > > and a dirt simple view > <%= @post[:id] %> > > How fast is that? If it''s not fast, then you can take your focus off the > database and point it back to your server config. > > Here''s the deal. It''s fast on the local machine under WEBrick. Ok, > that''s > understandable -- long-running process, no network overhead, but wait! > The > database on the local machine should be *slower*. So, as I continue > attempt > inference from this thread, it tells me that the performance problem is > in > the server on the remote host or the host itself. > > My first guess was that the deployment was straight CGI and that''s what > was > causing the holdup. If I''m not right, it''ll show up in the logs. > > --steve > > > Philip Hallstrom-8 wrote: >>>> >>> Do? I thought it would just query the database once, grab all the >> >> And now Rails does a join query so you only have one database query. >> >> -philip >> >> > >> >> > > -- > View this message in context: > http://www.nabble.com/-Rails--The-speed-of-Rails-tf3145992.html#a8742978 > Sent from the RubyOnRails Users mailing list archive at Nabble.com.I share the same feelings, I''m thinking it''s NetFirms being cheap and running it on CGI, hence why I was asking for a better host. Sample logs look like: Processing ArticlesController#show (for **.**.***.*** at 2007-01-31 21:57:03) [GET] Parameters: {"action"=>"show", "id"=>"1", "controller"=>"articles"} Rendering within layouts/articles Rendering articles/show Completed in 0.18064 (5 reqs/sec) | Rendering: 0.02450 (13%) | DB: 0.11660 (64%) | 200 OK [http://www.joshgilman.com/articles/show/1] I blocked my IP out of course. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
[railsplayground.com]> Now here''s my question. They offer two plans, one for $60 a month but no > support for lighttpd/mongrel servers and then one for $108 a month with > support for lighttpd/mongrel servers. Is it worth it to go all the way > to $108 for the servers for pay $60 and go with fastcgi?Those prices are actually per _year_... apologies if that''s already clear. So, $9 per month gets you two mongrel instances (the least you really need but also more than enough to get going), and you can add more instances for under $4 a month each. I''m not affiliated, though I have been a customer for over a year. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
That''s odd. It is in your database access. I don''t suppose you''d like to put a pastie up of the code for the action, eh? Petr Janda-2 wrote:> > > I share the same feelings, I''m thinking it''s NetFirms being cheap and > running it on CGI, hence why I was asking for a better host. Sample logs > look like: > > > Processing ArticlesController#show (for **.**.***.*** at 2007-01-31 > 21:57:03) [GET] > Parameters: {"action"=>"show", "id"=>"1", "controller"=>"articles"} > Rendering within layouts/articles > Rendering articles/show > Completed in 0.18064 (5 reqs/sec) | Rendering: 0.02450 (13%) | DB: > 0.11660 (64%) | 200 OK [http://www.joshgilman.com/articles/show/1] > > > I blocked my IP out of course. > > -- >-- View this message in context: http://www.nabble.com/-Rails--The-speed-of-Rails-tf3145992.html#a8743961 Sent from the RubyOnRails Users mailing list archive at Nabble.com. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Steve Ross wrote:> That''s odd. It is in your database access. I don''t suppose you''d like to > put > a pastie up of the code for the action, eh? >How do you see its in the database ? 5 requests per second should not be noticable, if there is only one per hour. I timed access to the page from my machine at 3.5 seconds compared to yahoo.com at 0.5 seconds. So something is likely to be wrong. Could the OP determine just how the Rails machinery is invoked? Stephan -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
anibalrojas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Feb-01 13:43 UTC
Re: The speed of Rails
I would recommend also to subscribe to the new group: http://groups.google.com/group/rubyonrails-deployment?hl=en We are using shared and cheap hosting from RailsPlayground, for some of our proyects and it works great, the best part is the support. -- AnĂbal Rojas http://www.rubycorner.com http://www.hasmanydevelopers.com On Jan 30, 8:41 pm, Josh Gilman <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hello guys. > > Recently I have been developing a website using Rails. I come from a PHP > background, a very experienced one to say the least, and have been > developing for quite some time now. In PHP I have a framework quite like > Rails, although at the time of writing it I had no clue Rails even > existed. It shares the same basic concept of routing and a strong > database back-end. Here is a comparison of two sites I have developed, > the second one (Rails one) still under construction: > > http://countermail.com/index.php?mod=core- PHPhttp://www.joshgilman.com/articles/index- Rails > > I use standard 4MB/s cable connection via a wireless router and the PHP > website takes about 1-2 seconds to load whereas the Rails website takes > a good 6-7 seconds to load. This speed is really killing me, and I''m not > sure it''s entirely Rails fault but rather part of my host''s fault. My > question is what''s a good host to have a Rails application on? Is this > the normal speed I should expect from a rails application? I would love > to continue with this application but with speeds like this I am already > considering switching over to PHP. > > If anyone can make some suggestions to help me out here I would be very > greatful. Thank you. > > Cheers, > Josh > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@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 -~----------~----~----~----~------~----~------~--~---
I think it''s in the database because of this in the log: Completed in 0.18064 (5 reqs/sec) | Rendering: 0.02450 (13%) | DB: 0.11660 (64%) | 200 OK Notice that DB is 64% of the time. Still, you''re right, 5 req/sec should not be a big deal. I''d still like to know if it was deployed as a CGI because that''s then only time I''ve ever seen such gummy behavior. Rob Nichols-2 wrote:> > > Steve Ross wrote: >> That''s odd. It is in your database access. I don''t suppose you''d like to >> put >> a pastie up of the code for the action, eh? >> > > How do you see its in the database ? 5 requests per second should not be > noticable, if there is only one per hour. > > I timed access to the page from my machine at 3.5 seconds compared to > yahoo.com at 0.5 seconds. So something is likely to be wrong. > > Could the OP determine just how the Rails machinery is invoked? > > Stephan > > -- > Posted via http://www.ruby-forum.com/. > > > > >-- View this message in context: http://www.nabble.com/-Rails--The-speed-of-Rails-tf3145992.html#a8752373 Sent from the RubyOnRails Users mailing list archive at Nabble.com. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---