You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Foo Ji-Haw <jh...@nexlabs.com> on 2005/04/26 04:21:59 UTC

compiling perl on freebsd to support ithreads

Hello guys,

I know this is not exactly the best fit for this mailing list, but I am 
trying to use FreeBSD (4.11 + 5.3) for mp2 work. Hope that qualifies it!

The problem is that the perl that comes with FBSD is not compiled with 
ithreads. I read that to run different modperl apps on virtual sites 
without conflicting on namespace, I need to set PerlOptions +Parent. But 
this only works for Perl with ithreads.

I am not exactly a FreeBSD guru, and I really like to stick to Ports if 
possible. Can someone advise me on any params I can add to make && make 
install to enable ithreads?

Thanks guys.

Re: compiling perl on freebsd to support ithreads

Posted by Tom Schindl <to...@gmx.at>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Foo Ji-Haw schrieb:
| Hello Tom,
|
| Just to clarify: are you saying that forking is better than threading on
| windows? Even if it is, I will have to throw in IPC to talk between the
| forks?


No. What I'm trying to say:
When using Mod-Perl2 on win32 your modules have to be thread-safe
because you don't have the possibility to use prefork(like on Unix)
because it simply doesn't exists as a processing module for apache2 on
win32.

Hence on win32 you need a perl with ithreads-support. On your freebsd
you could turn of threads when running apache2 with prefork.

=> Setup on win32:
~   + perl with ithreads
~   + apache2 with win32-mpm
=> Setup on freebsd:
~ => A
~   + perl with ithreads
~   + apache2 with worker-mpm
~ => B:
~   + perl without ithreads
~   + apache2 with prefork

Tom

|
| Tom Schindl wrote:
|
| Foo Ji-Haw schrieb:
| | Hello Michael,
| |
| | Are you saying that Perl with ithreads is slower, therefore
| | implementation of threading on Perl is generally avoided?
| |
| | I write apps for both Windows and UNIX platforms. I thought that
| | iThreads is the better alternative to forking, which I think is not
| well
| | implemented in Windows.
| |
|
| As far as I know there's only a threaded mpm for Apache2 available on
| win32. If you have to support win32 and unix your modules must certainly
| be thread aware which means you can not use all functions
| mod_perl-provides to you. e.g. setting the document_root is one of those
| if I remember correctly. You cannot use perls "chdir", ... .
|
| Perl with compiled threads support (used or not used) is much slower and
| when new threads are started the whole memory is copied over because
| there's no copy-on-write logic like there is for fork.
|
|
| Tom
|
| | Michael Peters wrote:
| |
| |> Foo Ji-Haw wrote:
| |>
| |>
| |>> Hello Philip,
| |>>
| |>> You are suggesting that FBSD 4.x is not easy to compile ithreads via
| |>> ports. I wonder why FBSD even on 5.x does not come with ithreads
| |>> precompiled (Linux does!). But I find it quite a deterent to use FBSD
| |>> for multiple apps in the future.
| |>>
| |>
| |>
| |> One of the biggest complaints I hear (and voice) is that the linux
| |> distros ship a perl with ithreads. It's slower and almost noone
| wants or
| |> needs it. It looks like FBSD is doing what the majority of people want
| |> it to do, so I wouldn't knock it :)
| |>
| |>
| |>
| |
| |
|
|>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCb2YskVPeOFLgZFIRApqGAJ0bYCf6LobOy169v11yZSOQw12kOgCghBii
cYIbwJG/g2o8ONNpanxrBBA=
=YXw/
-----END PGP SIGNATURE-----

Re: compiling perl on freebsd to support ithreads

Posted by Foo Ji-Haw <jh...@nexlabs.com>.
Hello Tom,

Just to clarify: are you saying that forking is better than threading on 
windows? Even if it is, I will have to throw in IPC to talk between the 
forks?

Tom Schindl wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Foo Ji-Haw schrieb:
> | Hello Michael,
> |
> | Are you saying that Perl with ithreads is slower, therefore
> | implementation of threading on Perl is generally avoided?
> |
> | I write apps for both Windows and UNIX platforms. I thought that
> | iThreads is the better alternative to forking, which I think is not 
> well
> | implemented in Windows.
> |
>
> As far as I know there's only a threaded mpm for Apache2 available on
> win32. If you have to support win32 and unix your modules must certainly
> be thread aware which means you can not use all functions
> mod_perl-provides to you. e.g. setting the document_root is one of those
> if I remember correctly. You cannot use perls "chdir", ... .
>
> Perl with compiled threads support (used or not used) is much slower and
> when new threads are started the whole memory is copied over because
> there's no copy-on-write logic like there is for fork.
>
>
> Tom
>
> | Michael Peters wrote:
> |
> |> Foo Ji-Haw wrote:
> |>
> |>
> |>> Hello Philip,
> |>>
> |>> You are suggesting that FBSD 4.x is not easy to compile ithreads via
> |>> ports. I wonder why FBSD even on 5.x does not come with ithreads
> |>> precompiled (Linux does!). But I find it quite a deterent to use FBSD
> |>> for multiple apps in the future.
> |>>
> |>
> |>
> |> One of the biggest complaints I hear (and voice) is that the linux
> |> distros ship a perl with ithreads. It's slower and almost noone 
> wants or
> |> needs it. It looks like FBSD is doing what the majority of people want
> |> it to do, so I wouldn't knock it :)
> |>
> |>
> |>
> |
> |
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.0 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>
> iD8DBQFCbzONkVPeOFLgZFIRAoT7AJ9SVaXiBQvNNWwebKZHhJeblbFnVQCfQCWf
> u31I+dYacvfshbdzVwW2IQE=
> =drPU
> -----END PGP SIGNATURE-----
>

Re: compiling perl on freebsd to support ithreads

Posted by Stas Bekman <st...@stason.org>.
Tom Schindl wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Stas Bekman schrieb:
> | Tom Schindl wrote:
> | [...]
> |
> |> Perl with compiled threads support (used or not used) is much slower and
> |> when new threads are started the whole memory is copied over because
> |> there's no copy-on-write logic like there is for fork.
> |
> |
> | Actually there is COW in the recent perls, but it doesn't perform very
> | well.
> |
> |
> 
> Good to know. I'm following p5p but have only recognized the CLONE_SKIP
> discussion ;-)

Just visited the p5p Olympus, and I was told that while COW exists it's 
not used by perl_clone (threads) yet. But it's planned to try and see 
whether it improves the situation some time later (probably after Nicholas 
releases 5.8.7).

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Re: compiling perl on freebsd to support ithreads

Posted by Tom Schindl <to...@gmx.at>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stas Bekman schrieb:
| Tom Schindl wrote:
| [...]
|
|> Perl with compiled threads support (used or not used) is much slower and
|> when new threads are started the whole memory is copied over because
|> there's no copy-on-write logic like there is for fork.
|
|
| Actually there is COW in the recent perls, but it doesn't perform very
| well.
|
|

Good to know. I'm following p5p but have only recognized the CLONE_SKIP
discussion ;-)

Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCb6Z2kVPeOFLgZFIRAkvXAKCd4AZQOTQqWdC6sbc+36+709hJQgCeJvZV
xdwPJRI3nBxVJ4GEaYEj1I4=
=QbjX
-----END PGP SIGNATURE-----

Re: compiling perl on freebsd to support ithreads

Posted by Stas Bekman <st...@stason.org>.
Tom Schindl wrote:
[...]
> Perl with compiled threads support (used or not used) is much slower and
> when new threads are started the whole memory is copied over because
> there's no copy-on-write logic like there is for fork.

Actually there is COW in the recent perls, but it doesn't perform very well.


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Re: compiling perl on freebsd to support ithreads

Posted by Jay Scherrer <ja...@scherrer.com>.
I thought that it was a module compiled into Apache MPM. That you use
when compiling mp2. 

My bad

Jay Scherrer

On Wed, 2005-04-27 at 16:43 +0200, Tom Schindl wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Jay Scherrer schrieb:
> | According to Schwartz, when he last spoke on the subject, He recommended
> | using prefork with mp2. I guess he wasn't impressed enough with threads
> | yet.
> |
> 
> True if you can avoid it but as stated in another mail when runing on
> win32 as far as I know you can not use prefork.
> 
> [...]
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.0 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
> 
> iD8DBQFCb6UrkVPeOFLgZFIRAh06AJ4qZuJjxD1x2VI/BVlnD1Y5V65OVgCgjTAp
> W8kfEMO8bZk5hvpdUM4m6PU=
> =O5gE
> -----END PGP SIGNATURE-----


Re: compiling perl on freebsd to support ithreads

Posted by Tom Schindl <to...@gmx.at>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jay Scherrer schrieb:
| According to Schwartz, when he last spoke on the subject, He recommended
| using prefork with mp2. I guess he wasn't impressed enough with threads
| yet.
|

True if you can avoid it but as stated in another mail when runing on
win32 as far as I know you can not use prefork.

[...]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCb6UrkVPeOFLgZFIRAh06AJ4qZuJjxD1x2VI/BVlnD1Y5V65OVgCgjTAp
W8kfEMO8bZk5hvpdUM4m6PU=
=O5gE
-----END PGP SIGNATURE-----

Re: compiling perl on freebsd to support ithreads

Posted by Jay Scherrer <ja...@scherrer.com>.
According to Schwartz, when he last spoke on the subject, He recommended
using prefork with mp2. I guess he wasn't impressed enough with threads
yet.

Jay Scherrer

On Wed, 2005-04-27 at 08:39 +0200, Tom Schindl wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Foo Ji-Haw schrieb:
> | Hello Michael,
> |
> | Are you saying that Perl with ithreads is slower, therefore
> | implementation of threading on Perl is generally avoided?
> |
> | I write apps for both Windows and UNIX platforms. I thought that
> | iThreads is the better alternative to forking, which I think is not well
> | implemented in Windows.
> |
> 
> As far as I know there's only a threaded mpm for Apache2 available on
> win32. If you have to support win32 and unix your modules must certainly
> be thread aware which means you can not use all functions
> mod_perl-provides to you. e.g. setting the document_root is one of those
> if I remember correctly. You cannot use perls "chdir", ... .
> 
> Perl with compiled threads support (used or not used) is much slower and
> when new threads are started the whole memory is copied over because
> there's no copy-on-write logic like there is for fork.
> 
> 
> Tom
> 
> | Michael Peters wrote:
> |
> |> Foo Ji-Haw wrote:
> |>
> |>
> |>> Hello Philip,
> |>>
> |>> You are suggesting that FBSD 4.x is not easy to compile ithreads via
> |>> ports. I wonder why FBSD even on 5.x does not come with ithreads
> |>> precompiled (Linux does!). But I find it quite a deterent to use FBSD
> |>> for multiple apps in the future.
> |>>
> |>
> |>
> |> One of the biggest complaints I hear (and voice) is that the linux
> |> distros ship a perl with ithreads. It's slower and almost noone wants or
> |> needs it. It looks like FBSD is doing what the majority of people want
> |> it to do, so I wouldn't knock it :)
> |>
> |>
> |>
> |
> |
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.0 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
> 
> iD8DBQFCbzONkVPeOFLgZFIRAoT7AJ9SVaXiBQvNNWwebKZHhJeblbFnVQCfQCWf
> u31I+dYacvfshbdzVwW2IQE=
> =drPU
> -----END PGP SIGNATURE-----


Re: compiling perl on freebsd to support ithreads

Posted by Tom Schindl <to...@gmx.at>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Foo Ji-Haw schrieb:
| Hello Michael,
|
| Are you saying that Perl with ithreads is slower, therefore
| implementation of threading on Perl is generally avoided?
|
| I write apps for both Windows and UNIX platforms. I thought that
| iThreads is the better alternative to forking, which I think is not well
| implemented in Windows.
|

As far as I know there's only a threaded mpm for Apache2 available on
win32. If you have to support win32 and unix your modules must certainly
be thread aware which means you can not use all functions
mod_perl-provides to you. e.g. setting the document_root is one of those
if I remember correctly. You cannot use perls "chdir", ... .

Perl with compiled threads support (used or not used) is much slower and
when new threads are started the whole memory is copied over because
there's no copy-on-write logic like there is for fork.


Tom

| Michael Peters wrote:
|
|> Foo Ji-Haw wrote:
|>
|>
|>> Hello Philip,
|>>
|>> You are suggesting that FBSD 4.x is not easy to compile ithreads via
|>> ports. I wonder why FBSD even on 5.x does not come with ithreads
|>> precompiled (Linux does!). But I find it quite a deterent to use FBSD
|>> for multiple apps in the future.
|>>
|>
|>
|> One of the biggest complaints I hear (and voice) is that the linux
|> distros ship a perl with ithreads. It's slower and almost noone wants or
|> needs it. It looks like FBSD is doing what the majority of people want
|> it to do, so I wouldn't knock it :)
|>
|>
|>
|
|

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCbzONkVPeOFLgZFIRAoT7AJ9SVaXiBQvNNWwebKZHhJeblbFnVQCfQCWf
u31I+dYacvfshbdzVwW2IQE=
=drPU
-----END PGP SIGNATURE-----

Re: compiling perl on freebsd to support ithreads

Posted by Foo Ji-Haw <jh...@nexlabs.com>.
Hello Michael,

Are you saying that Perl with ithreads is slower, therefore 
implementation of threading on Perl is generally avoided?

I write apps for both Windows and UNIX platforms. I thought that 
iThreads is the better alternative to forking, which I think is not well 
implemented in Windows.

Michael Peters wrote:

>Foo Ji-Haw wrote:
>  
>
>>Hello Philip,
>>
>>You are suggesting that FBSD 4.x is not easy to compile ithreads via
>>ports. I wonder why FBSD even on 5.x does not come with ithreads
>>precompiled (Linux does!). But I find it quite a deterent to use FBSD
>>for multiple apps in the future.
>>    
>>
>
>One of the biggest complaints I hear (and voice) is that the linux
>distros ship a perl with ithreads. It's slower and almost noone wants or
>needs it. It looks like FBSD is doing what the majority of people want
>it to do, so I wouldn't knock it :)
>
>  
>

Re: compiling perl on freebsd to support ithreads

Posted by Stas Bekman <st...@stason.org>.
Michael Peters wrote:
> Foo Ji-Haw wrote:
> 
>>Hello Philip,
>>
>>You are suggesting that FBSD 4.x is not easy to compile ithreads via
>>ports. I wonder why FBSD even on 5.x does not come with ithreads
>>precompiled (Linux does!). But I find it quite a deterent to use FBSD
>>for multiple apps in the future.
> 
> 
> One of the biggest complaints I hear (and voice) is that the linux
> distros ship a perl with ithreads. It's slower and almost noone wants or
> needs it. It looks like FBSD is doing what the majority of people want
> it to do, so I wouldn't knock it :)

FWIW, Mandrake linux (post 10.1) no longer ships threaded perl. But we are 
going OT here.


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Re: compiling perl on freebsd to support ithreads

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Michael Peters wrote:
> Foo Ji-Haw wrote:
> 
>>Hello Philip,
> One of the biggest complaints I hear (and voice) is that the linux
> distros ship a perl with ithreads. It's slower and almost noone wants or
> needs it. It looks like FBSD is doing what the majority of people want
> it to do, so I wouldn't knock it :)
Trust me I'm not knocking it.  I'd be hard pressed to find something I 
seriously disagree with that FBSD does. The only thing that came out the 
previous mailing list thread was that FreeBSD 4.x thread support is crud
compared to the newer and better in the 5.x series after the SMPng


-- 
END
------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Developer / Liquidity Services, Inc.
	http://www.liquidityservicesinc.com

Re: compiling perl on freebsd to support ithreads

Posted by Michael Peters <mp...@plusthree.com>.
Foo Ji-Haw wrote:
> Hello Philip,
> 
> You are suggesting that FBSD 4.x is not easy to compile ithreads via
> ports. I wonder why FBSD even on 5.x does not come with ithreads
> precompiled (Linux does!). But I find it quite a deterent to use FBSD
> for multiple apps in the future.

One of the biggest complaints I hear (and voice) is that the linux
distros ship a perl with ithreads. It's slower and almost noone wants or
needs it. It looks like FBSD is doing what the majority of people want
it to do, so I wouldn't knock it :)

-- 
Michael Peters
Developer
Plus Three, LP


Re: compiling perl on freebsd to support ithreads

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Foo Ji-Haw wrote:
> Hello Philip,
> 
> Thanks for the good reply. Appreciate it. That has been bugging me for 
> the longest time.
> 
> You are suggesting that FBSD 4.x is not easy to compile ithreads via 
> ports. I wonder why FBSD even on 5.x does not come with ithreads 
> precompiled (Linux does!). But I find it quite a deterent to use FBSD 
> for multiple apps in the future.
As much as I love FreeBSD, I'm suggesting that FreeBSD 4.x and threads 
stay very far apart. It was complete redone in the 5.x series. 
"stabalized" in 5.3 the first "production" qualitity release in that 
series.

A good deal of things do play nice with threads on freebsd 5.3+.

Just because linux does it by default doesn't mean it support is any 
better.

Conversely, I believe at least a little while ago python had to be 
compiled without threads to enable mod_python.

Sorry for the ot response.  If you have other questions, I'll be happy 
to answer off list or suggest some FreeBSD links.




END
------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Developer / Liquidity Services, Inc.
	http://www.liquidityservicesinc.com

Re: compiling perl on freebsd to support ithreads

Posted by Foo Ji-Haw <jh...@nexlabs.com>.
Hello Philip,

Thanks for the good reply. Appreciate it. That has been bugging me for 
the longest time.

You are suggesting that FBSD 4.x is not easy to compile ithreads via 
ports. I wonder why FBSD even on 5.x does not come with ithreads 
precompiled (Linux does!). But I find it quite a deterent to use FBSD 
for multiple apps in the future.

Thanks anyway. It helps.

Philip M. Gollucci wrote:

>
> On Apr 25, 2005, at 10:21 PM, Foo Ji-Haw wrote:
>
>> Hello guys,
>>
>> I know this is not exactly the best fit for this mailing list, but I 
>> am trying to use FreeBSD (4.11 + 5.3) for mp2 work. Hope that 
>> qualifies it!
>
> you'll want
> cd /usr/ports/lang/perl5.8
> make WITH_THREADS=yes
>
> this will not build on amd64 arch;
> Also, this isn't going to work on 4.11.
>
> finally on 5.3 you'll want to edit /etc/libmap.conf to make sure all 
> involved libraries/apps
> link against libpthread.a and not libc_r.
>
> At some point right before the mp2rc5 release 
> ithreads+httpd2.1.5-dev+worker mpm worked for me.  It got borked 
> between now and then.  I haven't had time to isolate which party is at 
> fault yet.
>
> Also, in ports only mp2rc4 is available as the mp2rc5 commit/update 
> was rolled back by the maintainer...... I'm haven't read enough to 
> know why yet.
>
>>
>> The problem is that the perl that comes with FBSD is not compiled 
>> with ithreads. I read that to run different modperl apps on virtual 
>> sites without conflicting on namespace, I need to set PerlOptions 
>> +Parent. But this only works for Perl with ithreads.
>>
>> I am not exactly a FreeBSD guru, and I really like to stick to Ports 
>> if possible. Can someone advise me on any params I can add to make && 
>> make install to enable ithreads?
>>
>> Thanks guys.
>
>

Re: compiling perl on freebsd to support ithreads

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
On Apr 25, 2005, at 10:21 PM, Foo Ji-Haw wrote:

> Hello guys,
>
> I know this is not exactly the best fit for this mailing list, but I 
> am trying to use FreeBSD (4.11 + 5.3) for mp2 work. Hope that 
> qualifies it!
you'll want
cd /usr/ports/lang/perl5.8
make WITH_THREADS=yes

this will not build on amd64 arch;
Also, this isn't going to work on 4.11.

finally on 5.3 you'll want to edit /etc/libmap.conf to make sure all 
involved libraries/apps
link against libpthread.a and not libc_r.

At some point right before the mp2rc5 release 
ithreads+httpd2.1.5-dev+worker mpm worked for me.  It got borked 
between now and then.  I haven't had time to isolate which party is at 
fault yet.

Also, in ports only mp2rc4 is available as the mp2rc5 commit/update was 
rolled back by the maintainer...... I'm haven't read enough to know why 
yet.

>
> The problem is that the perl that comes with FBSD is not compiled with 
> ithreads. I read that to run different modperl apps on virtual sites 
> without conflicting on namespace, I need to set PerlOptions +Parent. 
> But this only works for Perl with ithreads.
>
> I am not exactly a FreeBSD guru, and I really like to stick to Ports 
> if possible. Can someone advise me on any params I can add to make && 
> make install to enable ithreads?
>
> Thanks guys.


Re: compiling perl on freebsd to support ithreads

Posted by Stas Bekman <st...@stason.org>.
Foo Ji-Haw wrote:
> Hello Stas,
> 
> I'd like to know more about your suggestion of 'running separate 
> mod_perl servers for each host'. Can you elaborate on that? I mean, do 
> you mean to run multiple copies of Apache?

That's correct, Foo Ji-Haw. See: http://modperlbook.org/html/ch12_01.html
In particular: http://modperlbook.org/html/ch12_10.html
You will have a front end light server which will rewrite to backend 
mod_perl servers.

Though this is good for production. If you have a collision because of the 
multiple developers using the same server, than a threaded perl with 
+Parent may work.

Finally, some old mp1 solutions may be of use too:
http://perl.apache.org/docs/1.0/guide/modules.html#Apache__PerlVINC___Allows_Module_Versioning_in_Location_blocks_and_Virtual_Hosts
Again, not the best solution for production use.

>> The question is whether you want to use it. Perl w/ithreads not only 
>> slows things down and requires more memory, while ok for dev purposes, 
>> it will probably won't scale well in production. The reason, cloning a 
>> new perl thread under the server with many modules loaded and busy CPU 
>> may take... a few minutes.
>>
>> We should really wait till perchild and/or metux [1] are completed, 
>> which is when you will be able to use a scalable solution for 
>> independant vhosts. The problems is that it doesn't seem that anybody 
>> is working on those.
>>
>> The best solution for now if you have conflicting namespaces, is to 
>> run separate mod_perl servers for each host.
>>
>> [1] http://nibiru.borg.metux.de:7000/wiki.mpm/
>>


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Re: compiling perl on freebsd to support ithreads

Posted by Foo Ji-Haw <jh...@nexlabs.com>.
Hello Stas,

I'd like to know more about your suggestion of 'running separate 
mod_perl servers for each host'. Can you elaborate on that? I mean, do 
you mean to run multiple copies of Apache?


> The question is whether you want to use it. Perl w/ithreads not only 
> slows things down and requires more memory, while ok for dev purposes, 
> it will probably won't scale well in production. The reason, cloning a 
> new perl thread under the server with many modules loaded and busy CPU 
> may take... a few minutes.
>
> We should really wait till perchild and/or metux [1] are completed, 
> which is when you will be able to use a scalable solution for 
> independant vhosts. The problems is that it doesn't seem that anybody 
> is working on those.
>
> The best solution for now if you have conflicting namespaces, is to 
> run separate mod_perl servers for each host.
>
> [1] http://nibiru.borg.metux.de:7000/wiki.mpm/
>

Re: compiling perl on freebsd to support ithreads

Posted by Stas Bekman <st...@stason.org>.
Foo Ji-Haw wrote:
> Hello guys,
> 
> I know this is not exactly the best fit for this mailing list, but I am 
> trying to use FreeBSD (4.11 + 5.3) for mp2 work. Hope that qualifies it!
> 
> The problem is that the perl that comes with FBSD is not compiled with 
> ithreads. I read that to run different modperl apps on virtual sites 
> without conflicting on namespace, I need to set PerlOptions +Parent. But 
> this only works for Perl with ithreads.
> 
> I am not exactly a FreeBSD guru, and I really like to stick to Ports if 
> possible. Can someone advise me on any params I can add to make && make 
> install to enable ithreads?

The question is whether you want to use it. Perl w/ithreads not only slows 
things down and requires more memory, while ok for dev purposes, it will 
probably won't scale well in production. The reason, cloning a new perl 
thread under the server with many modules loaded and busy CPU may take... 
a few minutes.

We should really wait till perchild and/or metux [1] are completed, which 
is when you will be able to use a scalable solution for independant 
vhosts. The problems is that it doesn't seem that anybody is working on those.

The best solution for now if you have conflicting namespaces, is to run 
separate mod_perl servers for each host.

[1] http://nibiru.borg.metux.de:7000/wiki.mpm/

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com