From: Robert Klemme Date: 2007-10-20T00:08:52+09:00 Subject: Re: [OT] Re: Should *most* memory be release back to the system? 2007/10/19, khaines@enigo.com : > On Fri, 19 Oct 2007, M. Edward (Ed) Borasky wrote: > > > fork() (or clone() in Linux) is cheap ... it's actually *instantiating* the > > thread or process that costs! Depending how smart your kernel is, you could > > This is just a side note, but the sentence above reminded me of it. > > Some time ago I wrote a Mongrel variation that used fork() on incoming > requests instead of spawning a thread. Throughput on it was lousy, > comparatively. Somewhere around an order of magnitude worse than using > Ruby threads. > > It would work for modest volume sites, but there was a large response time > tax imposed by forking versus using the Ruby threads. This was tested on > a Linux box, though it was an older (2.4.x kernel). Did you fork for every request? If so then it seems there might be a more optimal solution (starting worker processes and then sending off requests to them via DRb for example). Cheers robert