[Mongrel] Mongrel and memory usage

Pete DeLaurentis pete at nextengine.com
Tue Nov 6 03:11:21 EST 2007

Hi Kirk,

Does Mongrel need to be multi-threaded at all if you're working with  
Rails applications?

I use Lighttpd's mod_proxy_core to distribute incoming requests  
between 8 mongrels.  If mongrel A is working on another request, I  
want mongrel B to pick up the request right away.

If all 8 mongrels are busy, I believe Lighty retries the cycle a few  
times.  So, who needs threads?  I'm guessing this is a naive  
question, but I'd appreciate it if you'd set me straight.

Once I get a breather in my release schedule, I plan to look at a  
switch to evented mongrel.  Performance benchmarks + community  
feedback looks very good.  But I still need to get a better grasp on  
how it works + the differences from standard mongrel.


On Nov 5, 2007, at 11:02 AM, Kirk Haines wrote:

> On 11/5/07, Pete DeLaurentis <pete at nextengine.com> wrote:
>> What is a good value for --num-procs for rails applications, since
>> these are single threaded?  Does it depend on how fast the
>> application responds to users?
> It's application specific.  Your sweet spot is going to be big enough
> that you don't experience capacity starvation during load bursts when
> you have temporary periods where more traffic is coming in than you
> are clearing, but small enough that you don't waste resources.
> Experimentation will probably be required to find the best balance.
> If you try evented_mongrel, you don't need to worry about num_procs.
> It's irrelevant for the evented_mongrel.
> Kirk Haines
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users

More information about the Mongrel-users mailing list