perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject AW: Embperl and threaded mpm?
Date Mon, 26 Jun 2017 05:21:48 GMT
Hi Neil,

Embperl is not working with threaded mpm.

Preloading all your perl code saves a lot of memory due to code sharing.

The main issue is, that you have to make sure, not to open any file or database connection
or similar in the preload code, because that will be shared too, which does not work


-----Urspr√ľngliche Nachricht-----
Von: Neil Gunton [] 
Gesendet: Sonntag, 25. Juni 2017 21:08
Betreff: Embperl and threaded mpm?

Hi all, just wondering if Embperl was ever made threadsafe so it could 
work under Apache's event or worker apache mpm's.

The prefork does seem to limit somewhat the number of clients I can have 
on my server, presumably due to the memory footprint (no shared code 
between processes?).

It's been a while since I played with that stuff, so I've probably 
forgotten some things that I should have written down "way back when" I 
was developing the core website config in the early 2000's. Like, 
exactly how shared is the memory for my Perl code between Apache's 
preforked processes? I don't currently explicitly preload (Execute) all 
of my Embperl code at startup, even though I have a switch for that in 
my, and it's been so long now (> 10 years) that I don't 
remember why I disabled it. I do seem to remember that if you execute 
all your files in then it's shared at first, but then over 
time that becomes more fragmented (non-shared)? Sorry to be so vague, 
basically the way mod_perl/Embperl works with respect to how code gets 
shared (or not) between processes has always been a bit murky to me, so 
any tips would be appreciated.

Also, of course, whether event/worker is a thing I should be looking at 
for Embperl at all.



To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message