On Fri, Sep 30, 2011 at 7:04 PM, John Joseph Bachir <[email protected]> wrote: > If I'm running two rails apps on the same server using Unicorn, I have > to run two instances of Unicorn, right? > > If so, then here's a place where passenger might win in terms of > memory use, as the rails code will be loaded into memory twice, right?
If you have two apps then Phusion Passenger also loads Rails into memory twice. Unless if you're using the 'smart' spawning method (instead of the default 'smart-lv2' spawning method). The Phusion Passenger manual explains the difference between these two spawning methods. However 'smart' is practically useless these days because everybody uses Bundler. It is pretty much impossible nowadays to preload the Rails framework and sharing it between multiple apps transparently. We're planning on removing the 'smart' spawning method and only supporting 'smart-lv2' in the future. In the mean time, if you want to share the same Rails memory between apps, then you should merge them together into a single app. -- Phusion | Ruby & Rails deployment, scaling and tuning solutions Web: http://www.phusion.nl/ E-mail: [email protected] Chamber of commerce no: 08173483 (The Netherlands) _______________________________________________ Unicorn mailing list - [email protected] http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying
