views:

59

answers:

1

Hi,

Given that each Ruby-On-Rails application needs at least about 40MBs of memory, I was wondering if there is a way of running multiple rails-application instances (different ones) over one interpreter of Ruby so that all shared libraries (rmagick etc) are shared between different application instances, saving space.

If that would be possible, then, I could be running 5-6 rails applications in a single 256RAM virtual server.

Is that possible?

A: 

I don't think this is possible without substantially changing the current code base.

But all is not lost.

If these websites are fairly low traffic and you have a fast vps you should take in mind that mod passenger drops the instances from memory if they're inactive for a while. So in theory you could run an unlimited amount of applications as long as you only have a few active at the same time. The price is a slower response on the first request that loads the instance.

vise
thanks. yes, that could be a solution , but not to the original question :) In addition, the latency of "switching on" a ruby application is some seconds in many cases. That gives the user the feel that the website is slow - and might even leave the site before loading.
Asterios