[Mongrel] Threading Rails

Parker Thompson parkert at gmail.com
Wed Aug 27 12:59:32 EDT 2008


We (Pivotal Labs) have bee experimenting with Mongrel and Rails Edge
to see what happens if we remove the mutex around the dispatch to
Rails, our goal being to reduce memory usage in virtualized
environments where memory is tight.  We're pretty happy with the
results and ready to put together a real patch for Mongrel to allow
users to run Rails this way.  So, we're ready to patch Mongrel to
support this.

It probably doesn't make sense to just remove the handler's mutex
around dispatch as this could lead to num-processors threads in rails
concurrently.  Probably we'll want to limit that separately.  I'm
thinking we should patch the handler to optionally allow threading,
then make mongrel_rails support this + a limit on how many requests to
process concurrenty.

I'm wondeing what kind of patch you would want, and whether anyone has



More information about the Mongrel-users mailing list