> Am 13.04.2022 um 17:33 schrieb Yann Ylavic <ylavic....@gmail.com>:
>
> On Wed, Apr 13, 2022 at 4:22 PM Ruediger Pluem <rpl...@apache.org> wrote:
>>
>> On 4/12/22 2:08 PM, yla...@apache.org wrote:
>>
>>> @@ -3447,9 +3480,11 @@ static void server_main_loop(int remaini
>>> continue;
>>> }
>>>
>>> + max_daemon_used = 0;
>>> for (i = 0; i < num_buckets; i++) {
>>> - perform_idle_server_maintenance(i);
>>> + perform_idle_server_maintenance(i, &max_daemon_used);
>>> }
>>> + retained->max_daemon_used = max_daemon_used;
>>
>> Shouldn't we do the above only when max_daemon_used >
>> retained->max_daemon_used ? Otherwise we might shrink
>> retained->max_daemon_used if make_child increased it?
>
> You are right that retained->max_daemon_used can be shrinked with
> r1899777, it should be better now with the follow up r1899812.
> But here we need to set it unconditionally (not only when <
> max_daemon_used) because retained->max_daemon_used needs to decrease
> too when "high" children are stopped (e.g. MaxSpareThreads), it can't
> increase forever.
>
I have the feeling we are in need of some sort of stress tests on
the overall child management scenarios. Offering my help.
Cheers,
Stefan