Virtual Machine for Radiant


#1

I have talked a customer into using Radiant for a small project, but
they would like to remain with their server, who does not offer
Rails. However, they offer virtual machines and have Rails apps
running on those. So far so good. My question is how much RAM should
I go for? They offer 128 MB and 256 MB for only a little more. Is 128
enough or should I just talk them into the 256 and save everybody
some time?

Thanks.

Keith B.
Tel: +49-7731-79838380
removed_email_address@domain.invalid
http://keithbingman.com


#2

128MB is probably too little, unless you’re planning on getting away
with a single mongrel running the site. If you include
imagemagick-based image manipulation of any kind, that 128MB might be
pushing it too.


#3

Thanks. This is exactly what I needed to know. Yes ImageMagick (or
ImageScience) will be included. Are there any good resources you can
point me to about setting this all up? I have lots of Radiant sites
at this point, but all on shared hosting. This is a first.

Keith B.
Tel: +49-7731-79838380
removed_email_address@domain.invalid
http://keithbingman.com


#4

Lighttpd is small, fast and easy to setup. This great guide shows you
how to setup a rails stack in a VPS/dedicated server:

http://brainspl.at/rails_stack.html

The script described here may help too:

http://bliki.rimuhosting.com/space/knowledgebase/linux/miscapplications/ruby+on+rails

/AITOR

#5

I also use Mongrel behind Apache, but I’ve heard good things about
nginx too. I would say you can expect your Rails/Radiant processes to
consume at least 20MB of memory, on average around 30-40, including
RMagick or ImageScience.

For reference, seancribbs.com is running behind Apache 2.2 on one
Mongrel and there’s another app on there that has two of its own.
This server is also running MySQL so it gets close to the 256MB limit
at times, but I’ve never had notice of an over-use (yet). If their
needs aren’t that intense, sqlite3 might be a good solution for the
db.

I’ve also had great success with Litespeed; kckcc.edu uses that, with
its built-in Rails support. I’d say it consumes about as much as the
Apache/Mongrel option.

I second Daniel’s observation about ‘personal preference’, too. Really
it comes down to what you want to do and can put up with!

Sean


#6

I’d go with 256MB. I wouldn’t run Mongrel though, others may
disagree. I use Lighttpd with static FastCGI for my sites and all our
client sites we do with Radiant.

Lighttpd will really reduce your virtual server overhead as compared
to running Apache and by using FastCGI you reduce the complexity of
the overall setup by removing the need for any kind of Proxying.

Most of our clients run fine with lighttpd connecting to 3 static
fastcgi processes. Lighttpd also allows you to set min and max
fastcgi connections so the app can scale on demand to a certain
extent based on load.

But others on this list might swear by Mongrel, I wouldn’t use it in
a virtual server environment though, at least not at 128 or 256
memory points. Also, make sure you tweak your MySQL configuration
well, InnoDB is a memory hog and MySQL will easily eat way more
memory than your actual app will.

-James


#7

My preferred way to go about it is to use mongrel behind apache and
following instructions from

http://mongrel.rubyforge.org/docs/apache.html

But that’s mainly because I feel very confortable with both mongrel and
apache and I tend to be installing on fairly hefty machines.
Fastcgi, a direct single instance of mongrel, mongrel clustered behind
lighttpd, pound or pen are all good options depending on what
you’re confortable with and your performance needs. One of those options
might provide you with better utilisation of the resources
you’re getting.

There’s not really that much to doing it in a linux environment - the
most difficult part is figuring out which of the many
different ways of configuring things you want to follow.