[pgpool-general: 8211] Re: Pgpool Memory Requirement

Nikola(HM) nikm71 at hotmail.com
Fri Jun 10 04:00:02 JST 2022


Hello Bo,

Thanks for your reply.

Could you describe the formula by which the calculation is made in your 
letter.
Where is the Shared Memory calculation here and where is the Processing 
Memory.

Regards,
    Nikolay

On 09.06.2022 17:05, Bo Peng wrote:
> Hello,
>
>> Pgpool works as load balancer in Kubernetes with 3 replicas. Docker
>> image pgpool/pgpool:4.2.2 is used.
>>
>> The section "7.1.1. Memory Requirement" of Pgpool documentation
>> specifies an amount of memory is required.
>>
>> According to formulas there if I need 1000 of num_init_children with
>> max_pool=1 , the amount of Shared Memory should be
>>
>> 1000*1*17408 Bytes = 17 MB. That's not a lot for Shared Memory.
>>
>> In addition  Process Memory is calculated as num_init_children * 5 MB.
>> In my case it reaches 5000MB or 5GB.
>>
>> My question is:
>> Should we assign such an amount of memory for the pod in k8s in which
>> the Pgpool docker image works, given that we use Pgpool exclusively as a
>> load balancer?
> Sorry. There was a bug in the document "Memory Requirement" section.
>
> It's fixed in the following commit:
> https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=2b0f513430bab8b1d7898291638b335e8f04a76d
>
> Let me answer your question.
>
> If you settings is:
>
>    num_init_children = 1000
>    max_pool=1
>
> The requried memory is:
>
>    10 + 1000 * 1 * 0.02  + 1000 * 0.16 = 30MB + 160MB = 190MB
>
> Best regards,


More information about the pgpool-general mailing list