perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Perrin Harkins" <>
Subject Re: Scripts works under CGI but not under mod_perl (and thread stack size)
Date Tue, 14 Aug 2007 19:33:53 GMT
On 8/14/07, William A. Rowe, Jr. <> wrote:
> I'm familiar with copy-on-write.  Could you elaborate?  From httpd's
> perspective, those same gains are true of worker as well.

Perl's threads don't share much.  Most of the memory is used for data
structures, and these are fully duplicated in every thread.  With
forking, copy-on-write effectively shares much of this data, resulting
in a major reduction in memory used.

> One of my more favorite features of the pre-SMS apr pools was my patch
> to permit "locking" a pool read-only.  This let us see that folks were
> not jinxing the copy on write behavior of the process and config pools
> in httpd by writing back data (and breaking the read-only paged copy).

Perl doesn't use those pools anyway (well, mod_perl can use them, but
normal perl data storage doesn't go into them).

- Perrin

View raw message