I tested it and it works.

Thanks,
Yingqi

-----Original Message-----
From: Lu, Yingqi [mailto:yingqi...@intel.com] 
Sent: Tuesday, October 07, 2014 3:13 PM
To: dev@httpd.apache.org
Subject: RE: svn commit: r1629909 - in /httpd/httpd/trunk: include/ap_mmn.h 
include/scoreboard.h server/mpm/event/event.c server/mpm/eventopt/eventopt.c 
server/mpm/prefork/prefork.c server/mpm/worker/worker.c

Hi Yann,

I am still testing the fix. It is half way through. I already modified 
min_spare_threads to min_spare_threads/num_buckets for both worker and event 
MPM in my test bed, so I am testing the most recent version anyway (thought I 
would mention this together with the testing results).

Regarding to your following comments,

"Wouldn't it be better, though more thread/process consuming, to always 
multiply the values with the number of buckets? This concerns 
ap_daemons_to_start, ap_daemons_limit, [min|max]_spare_threads (for unixes 
threaded MPMs), ap_daemons_[min|max]_free (for prefork)"

I think it is better to keep the current way (not multiplying). In case that 
administrator use a huge number for these setting, if we multiply on top of 
that, it would be bad. That is my personal thought.

Thanks,
Yingqi

-----Original Message-----
From: Yann Ylavic [mailto:ylavic....@gmail.com] 
Sent: Tuesday, October 07, 2014 3:02 PM
To: httpd
Subject: Re: svn commit: r1629909 - in /httpd/httpd/trunk: include/ap_mmn.h 
include/scoreboard.h server/mpm/event/event.c server/mpm/eventopt/eventopt.c 
server/mpm/prefork/prefork.c server/mpm/worker/worker.c

On Tue, Oct 7, 2014 at 8:59 PM, Ruediger Pluem <rpl...@apache.org> wrote:
>
> On 10/07/2014 05:16 PM, yla...@apache.org wrote:
>> URL: 
>> http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/event/event
>> .c?rev=1629909&r1=1629908&r2=1629909&view=diff
>> =====================================================================
>> =========
>> --- httpd/httpd/trunk/server/mpm/event/event.c (original)
>> +++ httpd/httpd/trunk/server/mpm/event/event.c Tue Oct  7 15:16:02 
>> +++ 2014
>             if (all_dead_threads) {
>> @@ -2801,12 +2800,12 @@ static void perform_idle_server_maintena
>>
>>      retained->max_daemons_limit = last_non_dead + 1;
>>
>> -    if (idle_thread_count > max_spare_threads/num_buckets) {
>> +    if (idle_thread_count > max_spare_threads / num_buckets) {
>>          /* Kill off one child */
>>          ap_mpm_podx_signal(pod[child_bucket], AP_MPM_PODX_GRACEFUL);
>>          retained->idle_spawn_rate[child_bucket] = 1;
>>      }
>> -    else if (idle_thread_count < min_spare_threads/num_buckets) {
>> +    else if (idle_thread_count < min_spare_threads) {
>
> Why this?

My bad, thanks, fixed in r1629990.

However I was and am 'm still confused about the way for the adminstrator to 
configure these directives.
Should (s)he take into account the number of active CPU cores or should the MPM 
do that?
What about existing configurations?

Currently (r1629990, as per the original commit and Yingqi's proposed fixes to 
avoid division by 0), this is the administrator's job, but we silently raise 
the values if they don't feet well, this is not consistent IMHO.

Wouldn't it be better, though more thread/process consuming, to always multiply 
the values with the number of buckets? This concerns ap_daemons_to_start, 
ap_daemons_limit, [min|max]_spare_threads (for unixes threaded MPMs), 
ap_daemons_[min|max]_free (for prefork).

Reply via email to