My host here in Brazil recently accepted my suggestion to host rails applications, but the performance is unacceptable... Each page is taking 2-4 seconds to load. What do you guys suggest to improve it? How can we know what is slowing the server? I considered using cache or telling them to use mod_cache but I don''t think that this is the major issue about performance. The server is apache, running rails with fastcgi. Thanks, Pedro
Pedro Mariano Belo <pedrobelo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> My host here in Brazil recently accepted my suggestion to host rails > applications, but the performance is unacceptable... Each page is > taking 2-4 seconds to load.[...]> The server is apache, running rails with fastcgi.Are you quite sure that''s with FastCGI? Sounds like typical load times for regular CGI. -- Regards, Stian Grytøyr
What''s the best way of knowing it? When I rename dispatch.cgi to anything else the app still works but when I rename dispatch.fcgi to anything else it won''t work. Is it enough to tell they''re using fastcgi? I can ask for the apache configuration files or anything else if it helps. Thanks On Mon, 28 Feb 2005 15:37:54 +0100, Stian Grytøyr <sgrytoyr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Pedro Mariano Belo <pedrobelo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > My host here in Brazil recently accepted my suggestion to host rails > > applications, but the performance is unacceptable... Each page is > > taking 2-4 seconds to load. > [...] > > The server is apache, running rails with fastcgi. > > Are you quite sure that''s with FastCGI? Sounds like typical load times > for regular CGI. > > -- > Regards, > Stian Grytøyr >
>> The server is apache, running rails with fastcgi. > > Are you quite sure that''s with FastCGI? Sounds like typical load times > for regular CGI.You need to make it use dispatch.fcgi in the .htaccess file -- not dispatch.cgi (or .rb). Unless you''re doing something crazy expensive (like triggering nasty SQL statements on huge databases with no indexes), a 2-4 sec render time says something was badly configured. -- David Heinemeier Hansson, http://www.basecamphq.com/ -- Web-based Project Management http://www.rubyonrails.org/ -- Web-application framework for Ruby http://www.loudthinking.com/ -- Broadcasting Brain
I''ve got this from production.log, hope it helps: --- Processing BlogController#index . . . Rendering layouts/blog (200 OK) Completed in 1.606807 (0 reqs/sec) | Rendering: 0.253268 (15%) | DB: 0.145779 (9%) --- Thanks, Pedro On Mon, 28 Feb 2005 15:47:53 +0100, David Heinemeier Hansson <david-OiTZALl8rpK0mm7Ywyx6yg@public.gmane.org> wrote:> >> The server is apache, running rails with fastcgi. > > > > Are you quite sure that''s with FastCGI? Sounds like typical load times > > for regular CGI. > > You need to make it use dispatch.fcgi in the .htaccess file -- not > dispatch.cgi (or .rb). Unless you''re doing something crazy expensive > (like triggering nasty SQL statements on huge databases with no > indexes), a 2-4 sec render time says something was badly configured. > -- > David Heinemeier Hansson, > http://www.basecamphq.com/ -- Web-based Project Management > http://www.rubyonrails.org/ -- Web-application framework for Ruby > http://www.loudthinking.com/ -- Broadcasting Brain > >
I suggest to develop your application on localhost using webrick or fastcgi and figure out all the performance things there. On Mon, 28 Feb 2005 12:10:00 -0300, Pedro Mariano Belo <pedrobelo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''ve got this from production.log, hope it helps: > > --- > Processing BlogController#index > . . . > Rendering layouts/blog (200 OK) > Completed in 1.606807 (0 reqs/sec) | Rendering: 0.253268 (15%) | DB: > 0.145779 (9%) > --- > > Thanks, > Pedro > > On Mon, 28 Feb 2005 15:47:53 +0100, David Heinemeier Hansson > <david-OiTZALl8rpK0mm7Ywyx6yg@public.gmane.org> wrote: > > >> The server is apache, running rails with fastcgi. > > > > > > Are you quite sure that''s with FastCGI? Sounds like typical load times > > > for regular CGI. > > > > You need to make it use dispatch.fcgi in the .htaccess file -- not > > dispatch.cgi (or .rb). Unless you''re doing something crazy expensive > > (like triggering nasty SQL statements on huge databases with no > > indexes), a 2-4 sec render time says something was badly configured. > > -- > > David Heinemeier Hansson, > > http://www.basecamphq.com/ -- Web-based Project Management > > http://www.rubyonrails.org/ -- Web-application framework for Ruby > > http://www.loudthinking.com/ -- Broadcasting Brain > > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Tobi http://www.snowdevil.ca - Snowboards that don''t suck http://www.hieraki.org - Open source book authoring http://blog.leetsoft.com - Technical weblog
Using webrick to publish the same app I´ve got something around 25 reqs/sec! I´ll try to install fastcgi in my machine and see how it goes... thanks, Pedro On Mon, 28 Feb 2005 11:58:02 -0500, Tobias Luetke <tobias.luetke-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I suggest to develop your application on localhost using webrick or > fastcgi and figure out all the performance things there. > > On Mon, 28 Feb 2005 12:10:00 -0300, Pedro Mariano Belo > <pedrobelo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I''ve got this from production.log, hope it helps: > > > > --- > > Processing BlogController#index > > . . . > > Rendering layouts/blog (200 OK) > > Completed in 1.606807 (0 reqs/sec) | Rendering: 0.253268 (15%) | DB: > > 0.145779 (9%) > > --- > > > > Thanks, > > Pedro > > > > On Mon, 28 Feb 2005 15:47:53 +0100, David Heinemeier Hansson > > <david-OiTZALl8rpK0mm7Ywyx6yg@public.gmane.org> wrote: > > > >> The server is apache, running rails with fastcgi. > > > > > > > > Are you quite sure that''s with FastCGI? Sounds like typical load times > > > > for regular CGI. > > > > > > You need to make it use dispatch.fcgi in the .htaccess file -- not > > > dispatch.cgi (or .rb). Unless you''re doing something crazy expensive > > > (like triggering nasty SQL statements on huge databases with no > > > indexes), a 2-4 sec render time says something was badly configured. > > > -- > > > David Heinemeier Hansson, > > > http://www.basecamphq.com/ -- Web-based Project Management > > > http://www.rubyonrails.org/ -- Web-application framework for Ruby > > > http://www.loudthinking.com/ -- Broadcasting Brain > > > > > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > -- > Tobi > http://www.snowdevil.ca - Snowboards that don''t suck > http://www.hieraki.org - Open source book authoring > http://blog.leetsoft.com - Technical weblog >
Just for the record... The problem is solved. It was a problem in fast cgi configs as you all guessed. Thanks On Mon, 28 Feb 2005 14:56:22 -0300, Pedro Mariano Belo <pedrobelo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Using webrick to publish the same app I´ve got something around 25 > reqs/sec! I´ll try to install fastcgi in my machine and see how it > goes... > > thanks, > Pedro > > On Mon, 28 Feb 2005 11:58:02 -0500, Tobias Luetke > <tobias.luetke-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I suggest to develop your application on localhost using webrick or > > fastcgi and figure out all the performance things there. > > > > On Mon, 28 Feb 2005 12:10:00 -0300, Pedro Mariano Belo > > <pedrobelo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I''ve got this from production.log, hope it helps: > > > > > > --- > > > Processing BlogController#index > > > . . . > > > Rendering layouts/blog (200 OK) > > > Completed in 1.606807 (0 reqs/sec) | Rendering: 0.253268 (15%) | DB: > > > 0.145779 (9%) > > > --- > > > > > > Thanks, > > > Pedro > > > > > > On Mon, 28 Feb 2005 15:47:53 +0100, David Heinemeier Hansson > > > <david-OiTZALl8rpK0mm7Ywyx6yg@public.gmane.org> wrote: > > > > >> The server is apache, running rails with fastcgi. > > > > > > > > > > Are you quite sure that''s with FastCGI? Sounds like typical load times > > > > > for regular CGI. > > > > > > > > You need to make it use dispatch.fcgi in the .htaccess file -- not > > > > dispatch.cgi (or .rb). Unless you''re doing something crazy expensive > > > > (like triggering nasty SQL statements on huge databases with no > > > > indexes), a 2-4 sec render time says something was badly configured. > > > > -- > > > > David Heinemeier Hansson, > > > > http://www.basecamphq.com/ -- Web-based Project Management > > > > http://www.rubyonrails.org/ -- Web-application framework for Ruby > > > > http://www.loudthinking.com/ -- Broadcasting Brain > > > > > > > > > > > _______________________________________________ > > > Rails mailing list > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > -- > > Tobi > > http://www.snowdevil.ca - Snowboards that don''t suck > > http://www.hieraki.org - Open source book authoring > > http://blog.leetsoft.com - Technical weblog > > >