On 2/3/07, Daniel DeLorme <dan-ml / dan42.com> wrote:
> Lately I've been bothered by the large start-up time and memory consumption of
> rails (although this could apply to any large framework). The solution I have in
> mind is to load rails in one master process (slow, high memory) and then fork
> child processes (fast, most mem shared with parent) to be used by apache. Are
> there any projects out there that do something like this? Or am I gonna have to
> make it myself?

I'd say it should be possible to modify mongrel_cluster to do this
(maybe it even already does). I suppose that if you'll fork *after*
some processed requests, your memory gain will be better - as rails
uses lazy class loading - you want to do the fork after most of the
classes were loaded. OTOH, I guess that most of the memory is the
cache for objects, html snippets etc. and forking won't help you much
there - they cannot be shared.

Anyway, just try and see if it helps and what works best.