<div style="font:14px/1.5 'Lucida Grande', '微软雅黑';color:#333;"><div><div style="font-style: normal; font-variant: normal; font-family: 'Lucida Grande';"><div class="sign" style="widows: 1; padding: 20px 10px; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif !important;"><div class="name" style="color: rgb(115, 115, 115); font-size: 12px; font-weight: bold; line-height: 14px; border-left-color: rgb(239, 127, 37); border-left-width: 2px; border-left-style: solid; padding-left: 10px; height: 14px;">Dear &nbsp;<span style="color: rgb(51, 51, 51); font-size: 14px; font-weight: normal; line-height: 1.5; white-space: pre-wrap; widows: auto;">Tatsuo Ishii, </span>Thanks<span style="white-space: pre-wrap; widows: auto; color: rgb(51, 51, 51); font-size: 14px; font-weight: normal; line-height: 1.5;"> for your reply:</span></div><div class="name" style="color: rgb(115, 115, 115); font-size: 12px; font-weight: bold; line-height: 14px; border-left-color: rgb(239, 127, 37); border-left-width: 2px; border-left-style: solid; padding-left: 10px; height: 14px;"><span style="white-space: pre-wrap; widows: auto; color: rgb(51, 51, 51); font-size: 14px; font-weight: normal; line-height: 1.5;"><br></span></div><div class="name" style="color: rgb(115, 115, 115); font-size: 12px; font-weight: bold; line-height: 14px; border-left-color: rgb(239, 127, 37); border-left-width: 2px; border-left-style: solid; padding-left: 10px; height: 14px;"><span style="white-space: pre-wrap; widows: auto; color: rgb(51, 51, 51); font-size: 14px; font-weight: normal; line-height: 1.5;"><br></span></div><div class="name" style="color: rgb(115, 115, 115); font-size: 12px; font-weight: bold; line-height: 14px; border-left-color: rgb(239, 127, 37); border-left-width: 2px; border-left-style: solid; padding-left: 10px; height: 14px;"><br></div><div class="name" style="color: rgb(115, 115, 115); font-size: 12px; font-weight: bold; line-height: 14px; border-left-color: rgb(239, 127, 37); border-left-width: 2px; border-left-style: solid; padding-left: 10px; height: 14px;"><br></div><div class="name" style="color: rgb(115, 115, 115); font-size: 12px; font-weight: bold; line-height: 14px; border-left-color: rgb(239, 127, 37); border-left-width: 2px; border-left-style: solid; padding-left: 10px; height: 14px;">pgpool : &nbsp; &nbsp; &nbsp;192.168.9.132 (master), &nbsp;192.168.9.133(slaver)</div><div class="name" style="color: rgb(115, 115, 115); font-size: 12px; font-weight: bold; line-height: 14px; border-left-color: rgb(239, 127, 37); border-left-width: 2px; border-left-style: solid; padding-left: 10px; height: 14px;">postgresql: 192.168.9.132 (slaver), &nbsp; 192.168.9.133(master)</div><div class="name" style="color: rgb(115, 115, 115); font-size: 12px; font-weight: bold; line-height: 14px; border-left-color: rgb(239, 127, 37); border-left-width: 2px; border-left-style: solid; padding-left: 10px; height: 14px;">pgbench &nbsp; &nbsp; 192.168.9.203</div><div class="name" style="color: rgb(115, 115, 115); font-size: 12px; font-weight: bold; line-height: 14px; border-left-color: rgb(239, 127, 37); border-left-width: 2px; border-left-style: solid; padding-left: 10px; height: 14px;"><br></div><div class="name" style="color: rgb(115, 115, 115); font-size: 12px; font-weight: bold; line-height: 14px; border-left-color: rgb(239, 127, 37); border-left-width: 2px; border-left-style: solid; padding-left: 10px; height: 14px;"><br></div><div class="name" style="color: rgb(115, 115, 115); font-size: 12px; font-weight: bold; line-height: 14px; border-left-color: rgb(239, 127, 37); border-left-width: 2px; border-left-style: solid; padding-left: 10px; height: 14px;">&nbsp;When i test with postgresql, it cost a little time ( &lt;5 seconds) to establish new connection.</div><div class="name" style="color: rgb(115, 115, 115); font-size: 12px; font-weight: bold; line-height: 14px; border-left-color: rgb(239, 127, 37); border-left-width: 2px; border-left-style: solid; padding-left: 10px; height: 14px;"><br></div><div class="name" style="widows: 1; border-left-color: rgb(239, 127, 37); border-left-width: 2px; border-left-style: solid; padding-left: 10px; height: 14px;"><span style="widows: auto;"> </span><span style="color: rgb(51, 51, 51); font-size: 14px; font-weight: normal; line-height: 21px; white-space: pre-wrap; widows: auto;">pgbench -l -c 1024 -t 5 -r pgbench -p5432 -h192.168.9.133 -Unopass</span></div><div class="name" style="widows: 1; border-left-color: rgb(239, 127, 37); border-left-width: 2px; border-left-style: solid; padding-left: 10px; height: 14px;"><span style="color: rgb(51, 51, 51); font-size: 14px; font-weight: normal; line-height: 21px; white-space: pre-wrap; widows: auto;"><br></span></div><div class="name" style="color: rgb(115, 115, 115); font-size: 12px; font-weight: bold; line-height: 14px; border-left-color: rgb(239, 127, 37); border-left-width: 2px; border-left-style: solid; padding-left: 10px; height: 14px;"><br></div><div class="contact" style="color: rgb(51, 51, 51); font-size: 14px; font-weight: normal; line-height: 22px; border-bottom-color: rgb(229, 229, 229); padding: 15px 0px; margin-top: 18px; border-top-color: rgb(229, 229, 229); border-top-width: 1px; border-top-style: solid;"><p style="margin-top: 0px; margin-bottom: 0px; line-height: 18px; color: rgb(118, 116, 116); font-size: 12px;">Phone:+86 137 5171 0549</p><p style="margin-top: 0px; margin-bottom: 0px; line-height: 18px; color: rgb(118, 116, 116); font-size: 12px;">Email:<a href="mailto:liujf3@ucweb.com" target="_blank" title="mailto:liujf3@ucweb.com" style="color: rgb(19, 109, 186); text-decoration: none; -webkit-user-drag: none;">liujinfei@xiangrikui.com</a></p><p style="margin-top: 0px; margin-bottom: 0px; line-height: 18px; color: rgb(118, 116, 116); font-size: 12px;">Skype : scofier.liu</p><p style="margin-top: 0px; margin-bottom: 0px; line-height: 18px; color: rgb(118, 116, 116); font-size: 12px;"><br></p></div></div></div></div><span style="font: 14px/1.5 'Lucida Grande';color:#333;"><br></span><div class="foxmail_blockquote_fromhere_element" style="font: 12px/1.5 'Lucida Grande';padding:2px 0 2px 0;"><span style="color:#333;text-decoration:line-through;white-space:pre-wrap;">                            </span>&nbsp;原始邮件&nbsp;<span style="color:#333;text-decoration:line-through;white-space:pre-wrap;">                            </span></div><div style="font: 12px/1.5 'Lucida Grande';background:#efefef;color:#666666;padding:8px;"><div><b style="color:#999;">发件人:</b>&nbsp;Tatsuo Ishii&lt;ishii@postgresql.org&gt;</div><div><b style="color:#999;">收件人:</b>&nbsp;liujinfei&lt;liujinfei@xiangrikui.com&gt;</div><div><b style="color:#999;">抄送:</b>&nbsp;pgpool-general&lt;pgpool-general@pgpool.net&gt;</div><div><b style="color:#999;">发送时间:</b>&nbsp;2015年8月10日(周一) 12:38</div><div><b style="color:#999;">主题:</b>&nbsp;Re: [pgpool-general: 3939] pgpool establish new connection too slow</div></div><br><div class="mail_quote_5CA76AEA56334F5ABF01D9A479E4EAF2" style="font: 14px/1.5 'Lucida Grande';color:#333;"><pre style="white-space:pre-wrap;">&gt; I have test pgpool with pgbench as follows:
&gt; 
&gt; 
&gt; pgbench -l -c 1024 -t 5 -r pgbench -p9999 -h192.168.9.190 -Unopass
&gt; 
&gt; 
&gt; I find pgpool cost a lot of time (20 seconds) to establish 1024 connection.
&gt; 
&gt; 
&gt; 2015-08-10 19:58:20: pid 18756: DETAIL: connecting host=192.168.9.203 port=34465
&gt; 2015-08-10 19:58:21: pid 18206: LOG: new connection received
&gt; 2015-08-10 19:58:21: pid 18206: DETAIL: connecting host=192.168.9.203 port=34466
&gt; 2015-08-10 19:58:21: pid 19039: LOG: new connection received
&gt; 
&gt; 
&gt; How to config pgpool.conf to speed up new connection?

I assume you run pgbench on 192.168.9.203, pgpool-II is running on
192.168.9.190 and PostgreSQL runs somewhere (you didn't mention it).

I recommend you to run pgbench against PostgreSQL and see how long the
connection establish time is:

pgbench -l -c 1024 -t 5 -r pgbench -p9999 -h IP_PostgreSQL_RUNS_ON -Unopass

If it's something like 20 seconds, pgpool-II has not much to do with it
because the overhead comes from PostgreSQL.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: <a href="http://www.sraoss.co.jp/index_en.php" title="http://www.sraoss.co.jp/index_en.php">http://www.sraoss.co.jp/index_en.php</a>
Japanese:<a href="http://www.sraoss.co.jp" title="http://www.sraoss.co.jp">http://www.sraoss.co.jp</a>

</pre></div></div>