You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Jan Kaluza <jk...@redhat.com> on 2014/04/18 11:50:35 UTC
Re: 2.4 threading branch and apxs missing MPM_NAME
On 03/05/2014 08:56 PM, Fred Moyer wrote:
> Recent testing on the 2.4 threading branch has uncovered the issue
> where the httpd worker type cannot be determined in Apache2::Build for
> the reason that MPM_NAME is no longer included in the output of apxs
> -q:
>
> fredmoyer@aiko ~/dev $ ./httpd24/bin/apxs -q | grep MPM
> fredmoyer@aiko ~/dev $
>
> This seems to be a blocking issue in getting the 2.4 threading branch
> to build on prefork based environments. Soliciting suggestions here
> for a solution.
Hm, do you know why mod_perl needs to know that during compilation? If
it's really used for something, we will have to remove those
MPM-specific #ifdefs and use normal conditionals instead for httpd-2.4.
Jan Kaluza
> The httpd executable on Linux provides this information for the
> default server mpm, but I do not know the implications of this
> approach on Windows.
>
> fredmoyer@aiko ~/dev $ ./httpd24/bin/httpd -V
> Server version: Apache/2.4.7 (Unix)
> Server built: Mar 5 2014 11:55:08
> Server's Module Magic Number: 20120211:27
> Server loaded: APR 1.5.0, APR-UTIL 1.5.3
> Compiled using: APR 1.5.0, APR-UTIL 1.5.3
> Architecture: 64-bit
> Server MPM: prefork
> threaded: no
> forked: yes (variable process count)
> Server compiled with....
> -D APR_HAS_SENDFILE
> -D APR_HAS_MMAP
> -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
> -D APR_USE_SYSVSEM_SERIALIZE
> -D APR_USE_PTHREAD_SERIALIZE
> -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
> -D APR_HAS_OTHER_CHILD
> -D AP_HAVE_RELIABLE_PIPED_LOGS
> -D DYNAMIC_MODULE_LIMIT=256
> -D HTTPD_ROOT="/Users/fredmoyer/dev/httpd24"
> -D SUEXEC_BIN="/Users/fredmoyer/dev/httpd24/bin/suexec"
> -D DEFAULT_PIDLOG="logs/httpd.pid"
> -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
> -D DEFAULT_ERRORLOG="logs/error_log"
> -D AP_TYPES_CONFIG_FILE="conf/mime.types"
> -D SERVER_CONFIG_FILE="conf/httpd.conf"
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
> For additional commands, e-mail: dev-help@perl.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: 2.4 threading branch and apxs missing MPM_NAME
Posted by Jan Kaluža <jk...@redhat.com>.
On 04/28/2014 03:08 PM, Torsten Förtsch wrote:
> On 28/04/14 15:03, Jan Kaluža wrote:
>> I think we can remove that option
>
> Please do it so.
Done in r1590627. Although r1151822 seems to do similar thing, I think
my way provides cleaner error message and has working MP_NO_THREADS=1
option.
> Torsten
>
Jan Kaluza
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: 2.4 threading branch and apxs missing MPM_NAME
Posted by Torsten Förtsch <to...@gmx.net>.
On 28/04/14 15:03, Jan Kaluža wrote:
> I think we can remove that option
Please do it so.
Torsten
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: 2.4 threading branch and apxs missing MPM_NAME
Posted by Jan Kaluža <jk...@redhat.com>.
On 04/28/2014 03:03 PM, Jan Kaluža wrote:
> On 04/28/2014 02:57 PM, Torsten Förtsch wrote:
>> Hi Jan,
>>
>> On 28/04/14 13:22, Jan Kaluža wrote:
>>> On 04/23/2014 03:04 PM, Torsten Förtsch wrote:
>>>> On 23/04/14 13:21, Jan Kaluža wrote:
>>>>> Thanks for that summary Torsten. As I understand it right now, we
>>>>> should
>>>>> build mod_perl with httpd-2.4 with "-Duseithreads
>>>>> -Dusemultiplicity" and
>>>>> allow building with other combination if user explicitly wants it (set
>>>>> some command line parameter during build), right?
>>>>
>>>> We should by default require a Perl built with "-Duseithreads
>>>> -Dusemultiplicity". If the user explicitly wants it, we should also
>>>> accept a Perl built with "-Uuseithreads -Uusemultiplicity".
>>>>
>>>> All other combinations should be refused.
>>>
>>> Can you please check attached patch? If I understand you correctly, it
>>> should do what you propose.
>>
>> Can you please check what the difference between NONTHREADED_OK and
>> NO_THREADS is. They seem to serve the same purpose.
>
> I've checked that before sending the patch and it looks like this option
> is not used by anything:
Although.... I'm not sure right now...
http://svn.apache.org/viewvc?view=revision&revision=r1151822
Btw, you are the author of that :-P.
> $ grep "NONTHREADED_OK" -R .
> ./lib/ModPerl/BuildOptions.pm:NONTHREADED_OK 0 Using a non-threaded
> perl is okay with httpd >=2.3
> ./blib/lib/ModPerl/BuildOptions.pm:NONTHREADED_OK 0 Using a
> non-threaded perl is okay with httpd >=2.3
>
> I think we can remove that option, or if you like this name better, I
> can use it in my patch.
>
>> Torsten
>>
>
> Jan Kaluza
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
> For additional commands, e-mail: dev-help@perl.apache.org
>
Jan Kaluza
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: 2.4 threading branch and apxs missing MPM_NAME
Posted by Jan Kaluža <jk...@redhat.com>.
On 04/28/2014 02:57 PM, Torsten Förtsch wrote:
> Hi Jan,
>
> On 28/04/14 13:22, Jan Kaluža wrote:
>> On 04/23/2014 03:04 PM, Torsten Förtsch wrote:
>>> On 23/04/14 13:21, Jan Kaluža wrote:
>>>> Thanks for that summary Torsten. As I understand it right now, we should
>>>> build mod_perl with httpd-2.4 with "-Duseithreads -Dusemultiplicity" and
>>>> allow building with other combination if user explicitly wants it (set
>>>> some command line parameter during build), right?
>>>
>>> We should by default require a Perl built with "-Duseithreads
>>> -Dusemultiplicity". If the user explicitly wants it, we should also
>>> accept a Perl built with "-Uuseithreads -Uusemultiplicity".
>>>
>>> All other combinations should be refused.
>>
>> Can you please check attached patch? If I understand you correctly, it
>> should do what you propose.
>
> Can you please check what the difference between NONTHREADED_OK and
> NO_THREADS is. They seem to serve the same purpose.
I've checked that before sending the patch and it looks like this option
is not used by anything:
$ grep "NONTHREADED_OK" -R .
./lib/ModPerl/BuildOptions.pm:NONTHREADED_OK 0 Using a non-threaded
perl is okay with httpd >=2.3
./blib/lib/ModPerl/BuildOptions.pm:NONTHREADED_OK 0 Using a
non-threaded perl is okay with httpd >=2.3
I think we can remove that option, or if you like this name better, I
can use it in my patch.
> Torsten
>
Jan Kaluza
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: 2.4 threading branch and apxs missing MPM_NAME
Posted by Torsten Förtsch <to...@gmx.net>.
Hi Jan,
On 28/04/14 13:22, Jan Kaluža wrote:
> On 04/23/2014 03:04 PM, Torsten Förtsch wrote:
>> On 23/04/14 13:21, Jan Kaluža wrote:
>>> Thanks for that summary Torsten. As I understand it right now, we should
>>> build mod_perl with httpd-2.4 with "-Duseithreads -Dusemultiplicity" and
>>> allow building with other combination if user explicitly wants it (set
>>> some command line parameter during build), right?
>>
>> We should by default require a Perl built with "-Duseithreads
>> -Dusemultiplicity". If the user explicitly wants it, we should also
>> accept a Perl built with "-Uuseithreads -Uusemultiplicity".
>>
>> All other combinations should be refused.
>
> Can you please check attached patch? If I understand you correctly, it
> should do what you propose.
Can you please check what the difference between NONTHREADED_OK and
NO_THREADS is. They seem to serve the same purpose.
Torsten
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: 2.4 threading branch and apxs missing MPM_NAME
Posted by Jan Kaluža <jk...@redhat.com>.
On 04/23/2014 03:04 PM, Torsten Förtsch wrote:
> On 23/04/14 13:21, Jan Kaluža wrote:
>> Thanks for that summary Torsten. As I understand it right now, we should
>> build mod_perl with httpd-2.4 with "-Duseithreads -Dusemultiplicity" and
>> allow building with other combination if user explicitly wants it (set
>> some command line parameter during build), right?
>
> We should by default require a Perl built with "-Duseithreads
> -Dusemultiplicity". If the user explicitly wants it, we should also
> accept a Perl built with "-Uuseithreads -Uusemultiplicity".
>
> All other combinations should be refused.
Can you please check attached patch? If I understand you correctly, it
should do what you propose.
Jan Kaluza
> Torsten
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
> For additional commands, e-mail: dev-help@perl.apache.org
>
Re: 2.4 threading branch and apxs missing MPM_NAME
Posted by Vick Khera <kh...@kcilink.com>.
On Apr 23, 2014, at 7:13 PM, Fred Moyer <fr...@redhotpenguin.com> wrote:
> +1 to this. Looks like most system perls come built with
> ithreads/multiplicity. Perls that I usually build with perlbrew have
> both disabled.
The default configuration for FreeBSD ports shows that multiplicity is off, but threads are on. I personally build with both off on FreeBSD.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: 2.4 threading branch and apxs missing MPM_NAME
Posted by Fred Moyer <fr...@redhotpenguin.com>.
On Wed, Apr 23, 2014 at 6:04 AM, Torsten Förtsch
<to...@gmx.net> wrote:
> On 23/04/14 13:21, Jan Kaluža wrote:
>> Thanks for that summary Torsten. As I understand it right now, we should
>> build mod_perl with httpd-2.4 with "-Duseithreads -Dusemultiplicity" and
>> allow building with other combination if user explicitly wants it (set
>> some command line parameter during build), right?
>
> We should by default require a Perl built with "-Duseithreads
> -Dusemultiplicity". If the user explicitly wants it, we should also
> accept a Perl built with "-Uuseithreads -Uusemultiplicity".
+1 to this. Looks like most system perls come built with
ithreads/multiplicity. Perls that I usually build with perlbrew have
both disabled.
> All other combinations should be refused.
> For additional commands, e-mail: dev-help@perl.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: 2.4 threading branch and apxs missing MPM_NAME
Posted by Torsten Förtsch <to...@gmx.net>.
On 23/04/14 13:21, Jan Kaluža wrote:
> Thanks for that summary Torsten. As I understand it right now, we should
> build mod_perl with httpd-2.4 with "-Duseithreads -Dusemultiplicity" and
> allow building with other combination if user explicitly wants it (set
> some command line parameter during build), right?
We should by default require a Perl built with "-Duseithreads
-Dusemultiplicity". If the user explicitly wants it, we should also
accept a Perl built with "-Uuseithreads -Uusemultiplicity".
All other combinations should be refused.
Torsten
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: 2.4 threading branch and apxs missing MPM_NAME
Posted by Jan Kaluža <jk...@redhat.com>.
On 04/18/2014 12:20 PM, Torsten Förtsch wrote:
> On 18/04/14 11:50, Jan Kaluza wrote:
>> Hm, do you know why mod_perl needs to know that during compilation? If
>> it's really used for something, we will have to remove those
>> MPM-specific #ifdefs and use normal conditionals instead for httpd-2.4.
>
> Perl can be built in 3 different ways:
>
> 1) with global data structures. That way it supports only one
> interpreter per process and only one thread per process. But the
> resulting Perl is the fastest of the 3.
>
> -Uuseithreads -Uusemultiplicity
>
> 2) with support for multiple interpreters but leaving out thread
> synchronization. This is good for environments where conflicting data
> access can be eliminated by other means. Postgres' perl integration is
> an example. You can declare 2 backend languages, plperl and plperlu.
> They need 2 different interpreters. But only one of them can be active
> at a time.
>
> -Uuseithreads -Dusemultiplicity
>
> 3) support thread concurrency.
>
> -Duseithreads -Dusemultiplicity
>
> Historically, modperl supports either 1) or 3). I measured the
> performance difference between them years ago for perl 5.12. I got
> 15-20% which is quite a lot.
>
> I believe the majority of modperl-backed web servers uses prefork. The
> best Perl in this context is 1). Up to httpd 2.2 modperl could check if
> the user tried to use such a Perl with a threaded MPM. It refused to
> compile in that case. For httpd 2.4, this check does not make sense
> anymore. Though, I think it would be good to allow the user to build
> modperl with a Perl built as per 1). I think this should be allowed only
> upon request such as a command line parameter. In all other cases
> modperl should refuse to compile with all Perls except for 3).
Thanks for that summary Torsten. As I understand it right now, we should
build mod_perl with httpd-2.4 with "-Duseithreads -Dusemultiplicity" and
allow building with other combination if user explicitly wants it (set
some command line parameter during build), right?
If others agree with that, I will do that in httpd24threading branch.
> Just my 2¢,
> Torsten
>
Regards,
Jan Kaluza
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: 2.4 threading branch and apxs missing MPM_NAME
Posted by Torsten Förtsch <to...@gmx.net>.
On 18/04/14 11:50, Jan Kaluza wrote:
> Hm, do you know why mod_perl needs to know that during compilation? If
> it's really used for something, we will have to remove those
> MPM-specific #ifdefs and use normal conditionals instead for httpd-2.4.
Perl can be built in 3 different ways:
1) with global data structures. That way it supports only one
interpreter per process and only one thread per process. But the
resulting Perl is the fastest of the 3.
-Uuseithreads -Uusemultiplicity
2) with support for multiple interpreters but leaving out thread
synchronization. This is good for environments where conflicting data
access can be eliminated by other means. Postgres' perl integration is
an example. You can declare 2 backend languages, plperl and plperlu.
They need 2 different interpreters. But only one of them can be active
at a time.
-Uuseithreads -Dusemultiplicity
3) support thread concurrency.
-Duseithreads -Dusemultiplicity
Historically, modperl supports either 1) or 3). I measured the
performance difference between them years ago for perl 5.12. I got
15-20% which is quite a lot.
I believe the majority of modperl-backed web servers uses prefork. The
best Perl in this context is 1). Up to httpd 2.2 modperl could check if
the user tried to use such a Perl with a threaded MPM. It refused to
compile in that case. For httpd 2.4, this check does not make sense
anymore. Though, I think it would be good to allow the user to build
modperl with a Perl built as per 1). I think this should be allowed only
upon request such as a command line parameter. In all other cases
modperl should refuse to compile with all Perls except for 3).
Just my 2¢,
Torsten
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org