VPS for RoR review
I’ve been wanting to try one one those Virtual Private Server hosting solutions for some time. Today was rainy day, I consequently spent the day on it. I started my search on that railshostinginfo.com and resolved to start my investigation with railsplayground.com. That company offers the cheapest credible deal and has a good reputation on the rails-talk mailing list. The price is $15 per month with a 12 months commitment for 256MB memory (up to 512MB spikes, what that means exactly I don’t know), 10GB disk space, 100GB. bandwitdh.
Getting started: 5 minutes after I entered my CC number, the server was up and running.
I went for the Ubuntu 8.04 server since this is distro I know well.
First impressions:
- I logged in with ssh, the server is very responsive, not the slightest delay when typing.
- Nice web console that allows you to track the status of your server.
- As specified, 10GB disk is available.
- The Ubuntu setup only has the bare essentials, no mysql, no apache, no compiler, no ruby.
- The internet connection appears to be lightning fast.
total used free shared buffers cached Mem: 524288 17860 506428 0 0 0 -/+ buffers/cache: 17860 506428 Swap: 0 0 0That means 512MB available, but don’t think about relying on swap space.
Setup:
- apt is setup with only the main repository without access to updates, you’ll need to add the universe to /etc/apt/sources.list:
deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates main restricted deb http://us.archive.ubuntu.com/ubuntu/ hardy universe
- “apt-get update” to get your local cache up-to-date
- “apt-get -u upgrade” to upgrade everything
- mysql-server
- ruby
- build-essential
- wget
- rdoc
- ruby1.8-dev
- libmagick10
- libmagick9-dev
- irb
- libfcgi-ruby1.8
- libmysqlclient15-dev
- libopenssl-ruby
- rails
- gruff
- mongrel
- willpaginate
- mysql
- rmagick
Web server I naturally started with Apache that I intended to run with mod_fcgid. But, wow, right after setup with all the default options, Apache takes 250MB. It’s a no go.
Mongrel is a good replacement except that it only gives you one process listening for client requests. On the other hand, the memory footprint is less than 40MB.
I decide to give a try to Lighttpd that I have never used before. That’s a winner, the instructions at http://wiki.rubyonrails.org/rails/pages/Lighttpd are a breeze and it uses just ~25MB per lighttpd process. I don’t need more than 2.
Overall I’m very satisfied, everything is running in less that 115 MB, that leaves 385MB of memory and 9G of disk to spare. My fear that the 256MB VSP plans were just teasers was not justified. I originally just bought one month but I think I’m going to convert that to an annual subscription.