[Catalyst] Apache + mod_perl + Digest-SHA fails

Tomas Doran bobtfish at bobtfish.net
Wed Dec 16 21:11:20 GMT 2009


On 16 Dec 2009, at 21:00, Stuart Watt wrote:
> FastCGI allows you to move Perl processes outside Apache, so they  
> are wholly independent of each other, and no longer require any  
> binary compatibility.
>
> The downside is that you don't memory sharing, which you get with  
> prefork, especially on platforms that have a proper process fork().

Er, no - your fcgi process manager loads the app and calls fork() for  
you, so you get memory sharing.

In mod_perl, apache is driving, so it calls fork(), and then asks the  
perl interpreter to clone itself. This also tries to 'do the right  
thing', keeping preloaded code shared.

IME, mod_perl tends to be _less_ efficient at this (as interpreter  
cloning is less trivial than simple fork), but you get (at least some  
of) the same shared memory / copy on write effect from both, even on  
win32 where fork() is emulated.

Cheers
t0m




More information about the Catalyst mailing list