Rails app costs minimum 15$/month?


Hi there,
I’ve used dreamhost for my php-based projects and I love it!
But recently I started to play with Ruby on Rails, and I find out that memory consumption is much higher than I expected.
Using DH PS I run simple rails app with 1 hit per day with mongrel - top says that mongrel process takes 142 Mb of ram. If I use passenger, things get much worse.

11756 1 129.4 MB ? Passenger ApplicationSpawner: /path/to/rails_app
11776 1 130.4 MB ? Rails: /path/to/rails_app
11930 1 152.2 MB ? Rails: /path/to/rails_app

So, in total with passenger it takes 400 Mb to run very low traffic rails application.
This numbers are confirmed with DH panel.
i.e. with mongrel - 15$ per month. with passenger - 40$ per month.

I understand, that because of 64bit os, it takes twice as much memory, but still, isn’t it too much? Do I miss something?
Is such memory consumption normal for rails?


Well, according to DH this situation is ok.
So, my solution to this is to use VPS.
There are companies on the market that offer unmanged VPS with 512mb RAM for just 10$ per month. Sweet!

The only drawback is that you have to be able to set up linux box…


What numbers are you looking at in top? The only one that matters with respect to DreamHost PS is the resident size (RSS or RES) – the virtual size (VSZ or VIRT) and shared size (SHR) aren’t what’s looked at. FWIW, my PS ends up using around 20 MB extra for the Passenger goop, plus whatever the application ends up using.

If your application is really getting that little traffic, though, it may be worth setting it up to run as FastCGI (or even standard CGI), as those are better at getting out of the way when they aren’t being used. They are significantly slower, but at one hit a day it hardly matters!


Hi Andrew,

I was looking mostly at the passenger-memory-stat output. This script should give meaningful numbers…
But what is more important, I got > 300 Mb usage for single rails app with dreamhost PS graphs in the web panel. (100 Mb for PS + 250Mb for passenger processes). This numbers in the graph is what I pay for at the end…

Whatever. I am back to DH shared server. And my rails app are at my VPS. I am fully satisfied now.