<div dir="ltr"><div><div>Hello,</div><div><br></div><div>Currently, backlog parameter for listen() call is set to 2 * num_init_children.</div><div><br></div><div>&gt; backlog = pool_config-&gt;num_init_children * 2</div><div>
<br></div><div>Is there a specific reason behind this? We&#39;re in a situation where we expect a</div><div>large number of concurrent connections, but unable to increase</div><div>num_init_children anymore due to memory limitation of the pgpool server and the</div>
<div>backends.</div><div><br></div><div>We&#39;ve observed on our system that when the number of concurrent connections</div><div>exceeds 3 * num_init_children, the extra connections are refused as expected,</div><div>but not immediately but after a few seconds (around 20). So we&#39;re not likely</div>
<div>to have a problem even if there are many number of connections, as each one</div><div>of them finishes very quickly.</div><div><br></div><div>However, we want to make sure that those extra connections are guaranteed to</div>
<div>be queued by pgpool without having to increase num_init_children.</div><div><br></div><div>So we&#39;ve added a parameter called `listen_backlog_multiplier` to our fork of pgpool,</div><div>which replaces the hard-coded number 2 in main.c.</div>
<div><br></div><div>&gt; backlog = pool_config-&gt;num_init_children * pool_config-&gt;listen_backlog_multiplier;</div><div><br></div><div>So what do you think? Do you think it makes sense? I will not attach the patch</div>
<div>here, since it&#39;s a very simple and straightforward one, and I haven&#39;t properly</div><div>documented it.</div><div><br></div><div>Thanks.</div><div><br></div><div>Junegunn Choi.</div></div></div>