On Tue, Aug 30, 2005 at 10:37:07PM +0100, Colm MacCarthaigh wrote:
> On Tue, Aug 30, 2005 at 06:00:47PM +0100, Colm MacCarthaigh wrote:
> > On Tue, Aug 30, 2005 at 05:25:07PM +0100, Joe Orton wrote:
> > > So is mod_cgid still the default CGI module for worker because there 
> > > once existed some ye-olde-Unixes which had an "interesting" fork() 
> > > implementation?  Given that POSIX has mandated since 2001 or whatever 
> > > that fork() duplicates only the calling thread, is there any 
> > > disadvantage to using mod_cgi in all MPMs on modern platforms?
> > 
> > Can't think of any, and performance is easy to measure. 
> 
> Just some comparitive ab's, all with Linux 2.6.13, NPTL, 
> 
> ab -n 5000 -c 10 http://localhost/cgi-bin/test-cgi
> 
> 
>       MPM             cgid            cgi
> 
>       worker          594.28          588.69  req/sec. 
> 
>       event           665.11          661.28  req/sec. 
> 
>       leader          598.14          592.86  req/sec. 
> 
>       threadpool      594.94          591.87  req/sec. 
> 
> There seems to be a very consistent .1% advantage to using mod_cgid, for
> me at least. Of course, cgid eats a process table entry and some memory,
> but fork()'ing a plain process does seem to be less overhead.

Apologies for the previous empty mail ;)

If the performance difference is that small then mod_cgi is definitely a 
better default IMO: it has much better stderr handling (the "CGI bucket" 
stuff) and it will log to the correct vhost-specific logs.

joe

Reply via email to