<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:medium;"><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:medium;"><div><div>Hi Brice</div><div><br></div><div>You can find at least 2 threads related to max_pool during the last month, I had myself difficulties to understand it.&nbsp;</div><div><br></div><div><br></div><div>Basically, num_init_children = 48 means that you can have at most 48 concurrent active connections to pgpool. So once 48 connections are established, the following one will be queues. You can experiment with a very low setting of num_init_children to verify this.</div><div><br></div><div>If everyone connects with the same username/database then those 48 processes will correspond to 48 postgres backend connections. However if there are multiple username/database combinations, then the max_pool parameter comes into play and you can possibly have more than 48 postgres backend processes (but the maximum concurrent connections remain 48, i.e. the number of pgpool processes).&nbsp;</div><div><br></div><div>Again you have to look at the view pg_stat_activity and check the output of the ps command on your db servers to verify this, it is not very intuitive to get it from the documentation.</div><div><br></div><div>Pierre</div><div><br></div></div><div><br></div><div><br></div><hr></div><div id="ydp4387b91dyahoo_quoted_8063700005" class="ydp4387b91dyahoo_quoted"><div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;"><div>On Monday, June 12, 2017, 11:21:50 AM GMT+2, Brice CHAPPE &lt;bricechappe@gmail.com&gt; wrote:</div><div><br></div><div><br></div><div><div id="ydp4387b91dyiv8454375420"><div><div class="ydp4387b91dyiv8454375420WordSection1"><p class="ydp4387b91dyiv8454375420MsoNormal">Hi all,</p><p class="ydp4387b91dyiv8454375420MsoNormal"> &nbsp;</p><p class="ydp4387b91dyiv8454375420MsoNormal"><span lang="EN-US">I would want to confirm if my configuration is fine.</span></p><p class="ydp4387b91dyiv8454375420MsoNormal"><span lang="EN-US">In the manual you said that “</span><span lang="EN-US" style="font-size: 9pt; font-family: Verdana, sans-serif; color: black; background-color: white;">Number of connections to each PostgreSQL is roughly max_pool*num_init_children”</span></p><p class="ydp4387b91dyiv8454375420MsoNormal"><span lang="EN-US" style="font-size: 9pt; font-family: Verdana, sans-serif; color: black; background-color: white;">I have 4 postgresql nodes behind pgpool. 1 master and 3 slaves (cluster managed by repmgr)</span></p><p class="ydp4387b91dyiv8454375420MsoNormal"><span lang="EN-US" style="font-size: 9pt; font-family: Verdana, sans-serif; color: black; background-color: white;">Each node has 16 cores and 64GB memory.</span></p><p class="ydp4387b91dyiv8454375420MsoNormal"><span lang="EN-US" style="font-size: 9pt; font-family: Verdana, sans-serif; color: black; background-color: white;">So I set on each postgresql node max_connections to 200 and set num_init_children=48 and max_pool to 4 in pgpool configuration.</span></p><p class="ydp4387b91dyiv8454375420MsoNormal"><span lang="EN-US" style="font-size: 9pt; font-family: Verdana, sans-serif; color: black; background-color: white;">48*4 = 192 connections </span></p><p class="ydp4387b91dyiv8454375420MsoNormal"><span lang="EN-US" style="font-size: 9pt; font-family: Verdana, sans-serif; color: black; background-color: white;">My question is : pgpool is capable to open 192 connections on each postgresql instance or just totally 192 connections on all nodes ?</span></p><p class="ydp4387b91dyiv8454375420MsoNormal"><span lang="EN-US" style="font-size: 9pt; font-family: Verdana, sans-serif; color: black; background-color: white;">Or I have to upgrade the num_ini_children value ?</span></p><p class="ydp4387b91dyiv8454375420MsoNormal"><span lang="EN-US" style="font-size: 9pt; font-family: Verdana, sans-serif; color: black; background-color: white;"> &nbsp;</span></p><p class="ydp4387b91dyiv8454375420MsoNormal"><span lang="EN-US" style="font-size: 9pt; font-family: Verdana, sans-serif; color: black; background-color: white;">Thanks !</span></p><p class="ydp4387b91dyiv8454375420MsoNormal"><span lang="EN-US" style="font-size: 9pt; font-family: Verdana, sans-serif; color: black; background-color: white;"> &nbsp;</span></p><p class="ydp4387b91dyiv8454375420MsoNormal"><span lang="EN-US" style="font-size: 9pt; font-family: Verdana, sans-serif; color: black; background-color: white;">Regards</span></p><p class="ydp4387b91dyiv8454375420MsoNormal"><span lang="EN-US" style="font-size: 9pt; font-family: Verdana, sans-serif; color: black; background-color: white;"> &nbsp;</span></p><p class="ydp4387b91dyiv8454375420MsoNormal"><span lang="EN-US" style="font-size: 9pt; font-family: Verdana, sans-serif; color: black; background-color: white;">Brice</span></p></div></div></div>_______________________________________________<br>pgpool-general mailing list<br><a href="mailto:pgpool-general@pgpool.net" rel="nofollow" target="_blank">pgpool-general@pgpool.net</a><br><a href="http://www.pgpool.net/mailman/listinfo/pgpool-general" rel="nofollow" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><br></div></div></div></div></body></html>