<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>> backlog = pool_config->num_init_children * 2</div><div>
<br></div><div>Is there a specific reason behind this? We'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'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'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'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>> backlog = pool_config->num_init_children * pool_config->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's a very simple and straightforward one, and I haven't properly</div><div>documented it.</div><div><br></div><div>Thanks.</div><div><br></div><div>Junegunn Choi.</div></div></div>