unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Hongli Lai <hongli@phusion.nl>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: Multiple rack applications on the same server with unicorn
Date: Fri, 30 Sep 2011 21:50:33 +0200	[thread overview]
Message-ID: <CAM3ce8EbzR7R8S16ssKf+w9d+jsZ5p4PO32Odg-fKVnp5joNCA@mail.gmail.com> (raw)
In-Reply-To: <CAOf2Z5t+artehpTPuror3vSiOBmavAceyYOidgS8qyYVJWNL1g@mail.gmail.com>

On Fri, Sep 30, 2011 at 7:04 PM, John Joseph Bachir
<johnjosephbachir@gmail.com> 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: info@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying

  parent reply	other threads:[~2011-09-30 20:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-30 17:04 Multiple rack applications on the same server with unicorn John Joseph Bachir
2011-09-30 17:16 ` Eric Wong
2011-09-30 19:50 ` Hongli Lai [this message]
2011-10-01  3:34   ` John Joseph Bachir

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/unicorn/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAM3ce8EbzR7R8S16ssKf+w9d+jsZ5p4PO32Odg-fKVnp5joNCA@mail.gmail.com \
    --to=hongli@phusion.nl \
    --cc=mongrel-unicorn@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).