multiple perls for mod_perl on NT 
Author Message
 multiple perls for mod_perl on NT

Hi,

I'm running mod_perl on WinNT. This is my config

 NT 4.0 SP3
 MS VC++ 6.0 SP2
 Apache 1.3.6
 perl 5.005_03
 mod_perl 1.19

Although Apache + perl + mod_perl is an excellent combination of
software, on Windows there is one major drawback. Apache on NT is a
multithreaded program. Each connection is served by one of child
threads. mod_perl creates only one Perl interpreter for the whole
Apache process and use a mutex to keep those many threads from tread
on each other's foot. This effectively serializes all requests.
mod_perl must finish handling a request for each phase before
another request can be served.

You could run httpd with only one thread and it would make no
difference.

In essence to make mod_perl *usable* on NT I have to put a proxy
(mod_proxy) in front of httpd_perl. The proxy is configured with big
enough receiving buffer so it always can suck all the output from
httpd_perl immediately (ProxyReceiveBufferSize 1024000).

Just a little bit background info. Now my question...

I would like to hack mod_perl to create multiple perl interpreters,
each for one child thread. Firstly I tried to embed multiple perls
in one C program, but it crashed on me. This is the multiplicity.c
example from ExtUtils::Embed.

I've read perlfaqs, perlembed, recompiled perl several times
with/without objects, threads, multiplicity.

Any advice?

Thanks

--Trung



Fri, 09 Nov 2001 03:00:00 GMT  
 multiple perls for mod_perl on NT


Quote:
>In essence to make mod_perl *usable* on NT I have to put a proxy
>(mod_proxy) in front of httpd_perl. The proxy is configured with big
>enough receiving buffer so it always can suck all the output from
>httpd_perl immediately (ProxyReceiveBufferSize 1024000).

Sounds good.  If you have a memory bottleneck, this is actually a
good way to run multi-process apache.  You can replace, say 20 full
featured server processes with say 10 or so, and run another 30 or
more stripped down servers that handle the static content requests
and refer the rest to the 10 full featured servers, all with the
same memory use and as good or better response.

Don't know how well this applies to apache on NT.

Quote:
>Just a little bit background info. Now my question...

>I would like to hack mod_perl to create multiple perl interpreters,
>each for one child thread. Firstly I tried to embed multiple perls
>in one C program, but it crashed on me. This is the multiplicity.c
>example from ExtUtils::Embed.


see if someone is already working on this.  Remember that the apache
NT server is considered beta quality and mod_perl on NT (at least 1.18)
is considered alpha.


Fri, 09 Nov 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Does multiple scripts require multiple PERLs?

2. Multiple Perls in Win 32

3. Need to install perls DBI for NT

4. mod_perl for NT

5. mod_perl for NT

6. mod_perl on NT .. problems using Apache::Registry

7. Building mod_perl on NT

8. NT and mod_perl

9. Mod_Perl for NT

10. problem using mod_perl on NT

11. Mod_Perl for NT

12. mod_perl on NT

 

 
Powered by phpBB® Forum Software