You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Geoffrey Young <ge...@modperlcookbook.org> on 2003/12/03 21:10:53 UTC
new directive (was Re: [patch] adding mpm info to httpd
-V)
>> <IfThreaded>
>> MaxThreadsPerChild 5
>> </IfThreaded>
>
>
> This rubs me the wrong way FWIW.
oops, sorry :)
> I think it is best to have all
> directives for a specific MPM together in one container, and have that
> container specific to the MPM.
well, in some cases I'd certainly agree. however, I think that some "if I
have a threaded MPM" container would be genuinely useful. consider the
perl-framework, where the default httpd.conf that is generated has the exact
same directives
<IfModule worker.c>
StartServers 1
MaxClients 1
MinSpareThreads 1
MaxSpareThreads 1
ThreadsPerChild 1
MaxRequestsPerChild 0
</IfModule>
for both worker and perchild (and we'd need the same for leader someday I
suppose).
granted, this kind of duplication might make sense in some circumstances.
however, specifically for non-core directives it might be nice to have such
a feature. for instance, I can see some value in
<IfThreaded>
# if using a threaded mpm load some ultra-slow but threadsafe
# version of some ultra-fast but non-threadsafe module
</IfThreaded>
if this kind of thing (someday) applies to, say, php folks, then asking them
to duplicate this for each and every possible threaded MPM seems to be
asking a bit much.
but maybe this is all just academic anyway. thanks for listening
nonetheless :)
> If somebody really wants to do this they
> could use IfDefine; though it would be easier if the core pre-defined
> some symbol for use in IfDefine, it is doable as-is.
sure. the only reason I didn't go that way was that the docs seem to say
that <IfDefine> only applies to -D command-line parameters - I wasn't
familiar enough with the directives to see if there were other, internal -D
flags that were also used.
--Geoff
Re: new directive (was Re: [patch] adding mpm info
to httpd -V)
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
William A. Rowe, Jr. wrote:
> At 02:10 PM 12/3/2003, Geoffrey Young wrote:
>
>
>>>><IfThreaded>
>>>> MaxThreadsPerChild 5
>>>></IfThreaded>
>>>
>>>
>>>This rubs me the wrong way FWIW.
>>
>>oops, sorry :)
>
>
> I don't care for that container either... but even horrible new ideas
> are always good when then generate more ideas :)
:)
>
>
>>>If somebody really wants to do this they
>>>could use IfDefine; though it would be easier if the core pre-defined
>>>some symbol for use in IfDefine, it is doable as-is.
>>
>>sure. the only reason I didn't go that way was that the docs seem to say
>>that <IfDefine> only applies to -D command-line parameters - I wasn't
>>familiar enough with the directives to see if there were other, internal -D
>>flags that were also used.
>
>
> Actually, such defines might need to be a little more dynamic, but either
> <IfDefine AP_MPM_THREADED> would be good, or if we absolutely
> needed too, we could add <IfFeature FOO> where features could be
> registered, by the core or by a loaded module.
actually, the other idea I had (going for 0-2 on the horrible new idea theme
:) was <IfMPM AP_MPMQ_IS_THREADED> (or somesuch) as a direct interface to
ap_mpm_query, but I thought that outside of threaded/forked there wasn't
much other useful config-time information there.
but either/any form would probably be valuable to somebody somewhere along
the line.
>
> Individual <IfFoo> blocks would pollute the command table significantly,
> slowing down config parsing by a corresponding amount.
ah, good point.
--Geoff
Re: new directive
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
> Actually, such defines might need to be a little more dynamic, but either
> <IfDefine AP_MPM_THREADED> would be good, or if we absolutely
> needed too, we could add <IfFeature FOO> where features could be
> registered, by the core or by a loaded module.
to that end, here's a preliminary and rough patch for
<IfServerIs !threaded>
(substitute 'IfServerIs' for whatever you please - I'm not so good with names).
I couldn't think of anything else to implement other than threadedness right
now, but I guess we're discussing the concept at the moment so that's ok. I
did almost start on
<IfServerIs >= 2.1>
but I thought that the new container semantics probably wouldn't go over
well (and I wasn't entirely convinced that was a worthy thing to test at
config time).
--Geoff
Re: new directive (was Re: [patch] adding mpm
info to httpd -V)
Posted by "William A. Rowe, Jr." <wr...@apache.org>.
At 02:10 PM 12/3/2003, Geoffrey Young wrote:
>>> <IfThreaded>
>>> MaxThreadsPerChild 5
>>> </IfThreaded>
>>
>>
>> This rubs me the wrong way FWIW.
>
>oops, sorry :)
I don't care for that container either... but even horrible new ideas
are always good when then generate more ideas :)
>> If somebody really wants to do this they
>> could use IfDefine; though it would be easier if the core pre-defined
>> some symbol for use in IfDefine, it is doable as-is.
>
>sure. the only reason I didn't go that way was that the docs seem to say
>that <IfDefine> only applies to -D command-line parameters - I wasn't
>familiar enough with the directives to see if there were other, internal -D
>flags that were also used.
Actually, such defines might need to be a little more dynamic, but either
<IfDefine AP_MPM_THREADED> would be good, or if we absolutely
needed too, we could add <IfFeature FOO> where features could be
registered, by the core or by a loaded module.
Individual <IfFoo> blocks would pollute the command table significantly,
slowing down config parsing by a corresponding amount.
Bill