[pgpool-general: 8210] Re: Pgpool Memory Requirement
    Bo Peng 
    pengbo at sraoss.co.jp
       
    Thu Jun  9 23:05:31 JST 2022
    
    
  
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,
-- 
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS, Inc. Japan
https://www.sraoss.co.jp/
    
    
More information about the pgpool-general
mailing list