Ruby on Rails is too slow on dreamhost
At work I develop Ruby on Rails applications on my wonderful little Ubuntu servers using apache2, fcgid and mysql5. They work a treat, fast responsive and is basically an easy stage to bounce off new apps. So when I was thinking about my own apps I knew I wouldn’t be able to get the same spec machine and redundancy for what I can afford, but I thought I would give dreamhost a try, I should be able to get something near the same speed for test purposes. They were cheap, seemed to offer a massive range of options and copious amounts of bandwidth.
How wrong I was. As I was developing my still unreleased super cool app I noticed that the dreamhost email servers were going up and down faster that a 10 year old with a yo yo. Odd, very odd. Then I uploaded my app tonight and holy shit was it slow to upload. Then I began to use her and yes.. it sucked utter balls, too slow.
There seems to be a few factors responsible for the shit speeds. First of all is FastCGI. FastCGI should make my app wiz around like mad, however compared to CGI its basically the same on dreamhost, which suggests a hardware or priority shitness on the servers.
Then there could be database access speed slowing everything down. The database seems to be located on a different server altogether, again noted by others.
I thought it was just RoR on dreamhost that was slow, but no it wasn’t just that. Even if you access via ssh it all seems very sluggish, even doing a “rm -r” on a directory that contained about 20 files took about 10 seconds. Thats just stupid and should be sorted.
Am I expecting too much? A page that takes less than 10 seconds to load?
Perhaps dreamhost is fine for static pages, images and nothing else. Sigh.
March 11th, 2007 at 1:39 am
I’ve been running a number of rails apps on dreamhost for about 12 months and do not find these speed issues. In fact it works very well. SSH access to the shell is very quick too. My advice would be to contact DH with your concerns and see if there is a misconfiguration somewhere.
March 12th, 2007 at 8:32 pm
Yes. Good idea. This was a bit of a drunken rant, alas I’m still getting issues.
March 17th, 2007 at 12:12 am
No Andy, you are not alone. I have a dreamhost account and it has served me well for over a year now. I’m running Typo on it so I know that RoR is fine and everything works well.
But then I set up a new domain complete with svn repo and mysql db to run a RoR app I’m developing. Subversion is great but the app is slow as anything (7-8 sec wait for every page) and when I ssh into the server it’s usually fairly responsive unless I’m accessing the remote mysql db.
I don’t know if the mysql server is to blame or their network or what, but it sucks. They need to get their shit together!
My blog and the web app are on different servers, and different mysql servers as well so I have no clue where the cock-up is. I shouldn’t have to care, that’s why I have this shared hosting account.
I think I’m going to colo my own linux box soon because my gentoo vm (xen) that hosts my other website just works like a dream (LAMP, postfix, svn). If it weren’t a vm with modest specs I would use it for everything I’m doing.
Dreamhost is doing something very wrong when my vm outperforms their servers.
May 26th, 2007 at 11:53 am
Could the delay simple be down to using a US host for a primarily UK domain?
May 26th, 2007 at 12:02 pm
No not really. The delay is intermittent, so if you refresh over and over again sometimes is speedy enough, other times it takes ages. The delay is most defiantly at the dreamhost end.
June 1st, 2007 at 2:21 pm
you have to modify your .htaccess to use dispatch.fcgi and not dispatch.cgi
July 4th, 2007 at 3:22 pm
I had modified the .htaccess to use fast-cgi (and thus dispatch.fgci). That’s the first task I ever do.
Its seems to me that it just isn’t up to it. its very irregular when it comes to the speed of apps, not even really fit for demoing apps to people. Im going to try elsewhere.
August 13th, 2007 at 3:45 pm
I notice that the first hit on my RoR dreamhost app takes about 10 seconds, then subsequent pages are much quidker. But even the fast page loads are sluggish. Disappointing, because dreamhost is a very economical product.
September 12th, 2007 at 3:22 pm
I had the same problem, but found I was using Capistrano/Subversion where I didn’t manage .htaccess correctly. After the second deployment it was slow again, which I didn’t realize at the time, so I wasted some time cursing DH…
Loading time changes from somewhere like ten seconds to under half a second with .htaccess setup ok. Apps like Webistrano and Redmine runs snappy under my Dreamhost account.