<div style="font:14px/1.5 'Lucida Grande', '微软雅黑';color:#333;"><p style="font:14px/1.5 'Lucida Grande';margin:0;">Fix 192.168.9203 with 192.168.9.133</p><p style="font:14px/1.5 'Lucida Grande';margin:0;"><br></p><div><div style="font: 14px/1.5 'Lucida Grande';"><div class="sign" style="color: rgb(51, 51, 51); widows: 1; padding: 20px 10px; line-height: 22px; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif !important;"><pre style="line-height: 21px; white-space: pre-wrap; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif !important;"><p style="margin: 0px; font-size: 12px; line-height: normal; background-color: rgb(0, 0, 0);"><span style="color: rgb(41, 249, 20);">pgbench -l -c $CLIENTS&nbsp; -T $TIME -r pgbench -</span><font color="#ce3b00">p5432</font><font color="#29f914"> -h192.168.9.</font><font color="#dd2067">133</font><font color="#29f914"> -Unopass</font></p><div><br></div></pre></div><div class="sign" style="color: rgb(51, 51, 51); widows: 1; padding: 20px 10px; line-height: 22px; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif !important;"><div class="contact" style="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: 10px; 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;liujinfei&lt;liujinfei@xiangrikui.com&gt;</div><div><b style="color:#999;">收件人:</b>&nbsp;Tatsuo Ishii&lt;ishii@postgresql.org&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日(周一) 18:14</div><div><b style="color:#999;">主题:</b>&nbsp;Re: [pgpool-general: 3942] Re: pgpool establish new connection tooslow</div></div><br><div class="mail_quote_9C1B94C9A46049588D0AD7FBCBD76433" style="font: 14px/1.5 'Lucida Grande';color:#333;"><div style="font:14px/1.5 'Lucida Grande', '微软雅黑';color:#333;"><div><div style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px;"><div class="sign" style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif !important; line-height: 22px; color: rgb(51, 51, 51); widows: 1; padding: 20px 10px;">Hi,&nbsp;<span style="white-space: pre-wrap; font-family: 'Lucida Grande'; line-height: 1.5;">Tatsuo Ishii</span></div><div class="sign" style="widows: 1; padding: 20px 10px;"><pre style="color: rgb(51, 51, 51); widows: auto; white-space: pre-wrap;"><pre style="white-space: pre-wrap;"><font face="Lucida Grande" style="white-space: normal; widows: 1;"><span style="white-space: pre-wrap;">The test server has enough resource (cpu,mem,io) to handle the test. (</span></font><span style="white-space: normal; widows: 1; color: rgb(0, 0, 0); font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; line-height: 22px;">&nbsp;</span><span style="white-space: normal; widows: 1; color: rgb(0, 0, 0); font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; line-height: 22px;">6vCPU, 32GB Mem, 200GB sata</span><span style="line-height: 1.5; widows: 1; font-family: 'Lucida Grande';">)</span></pre></pre><pre style="color: rgb(51, 51, 51); widows: auto; white-space: pre-wrap;"><span style="font-family: 'Lucida Grande'; widows: 1;">I have postgresql and pgpool deployed as follow: </span></pre><pre style="color: rgb(51, 51, 51); widows: auto; white-space: pre-wrap;">&gt;&gt; pgpool :   192.168.9.132 (master), 192.168.9.133(slaver)
&gt;&gt; postgresql: 192.168.9.132 (slaver),  192.168.9.133(master)</pre><pre style="color: rgb(51, 51, 51); widows: auto; white-space: pre-wrap;"><font face="Lucida Grande" style="line-height: 1.5; white-space: normal; widows: 1;"><span style="white-space: pre-wrap;">The server load both 132 and 133 is very low ( &lt;1 ) when test with pgpool. (</span></font><span style="white-space: normal; widows: 1; color: rgb(34, 34, 34); font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 15px; line-height: 19px;">Concurrent connections &gt; 512</span><font face="Lucida Grande" style="line-height: 1.5; white-space: normal; widows: 1;"><span style="white-space: pre-wrap;">)</span></font></pre><pre style="color: rgb(51, 51, 51); widows: 1; white-space: pre-wrap;"><font face="Lucida Grande">My test command ( execute on server 192.168.9.203) : </font></pre><pre style="color: rgb(51, 51, 51); widows: 1; white-space: pre-wrap;"><p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">pgbench -l -c $CLIENTS&nbsp; -T $TIME -r pgbench -p9999 -h192.168.9.190 -Unopass</p></pre><pre style="widows: 1; white-space: pre-wrap;"><p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; background-color: rgb(0, 0, 0);"><span style="color: rgb(41, 249, 20);">pgbench -l -c $CLIENTS&nbsp; -T $TIME -r pgbench -</span><font color="#ce3b00">p5432</font><font color="#29f914"> -h192.168.9.</font><font color="#dd2067">203</font><font color="#29f914"> -Unopass</font></p></pre><pre style="color: rgb(51, 51, 51); widows: auto; white-space: pre-wrap;"><font face="Lucida Grande" style="line-height: 1.5; white-space: normal; widows: 1;"><span style="white-space: pre-wrap;"><br></span></font></pre><pre style="widows: 1; color: rgb(51, 51, 51); white-space: pre-wrap;"><font face="Lucida Grande">The test result is : </font></pre><pre style="color: rgb(51, 51, 51); widows: auto; white-space: pre-wrap;"><table class="foxmail_table" cellpadding="0" cellspacing="0"><tbody><tr><td style="border:1px solid #666666;padding:0 4px;min-width:52px;height:32px;text-align:center;white-space:nowrap;"><pre style="text-align: start; white-space: pre-wrap;"><img src="cid:8713CB4DE01AE67F19267BC6BB7E666B" modifysize="100%" class="no_selection_effect" style="width: 595px; height: 277px;"></pre></td></tr></tbody></table>
</pre><pre style="color: rgb(51, 51, 51); widows: auto; white-space: pre-wrap;">pgp: is represent for pgbench with pgpool</pre><pre style="color: rgb(51, 51, 51); widows: auto; white-space: pre-wrap;">pg: is represent for pgbench with postgresql</pre><pre style="color: rgb(51, 51, 51); widows: auto; white-space: pre-wrap;"><br></pre><pre style="color: rgb(51, 51, 51); widows: auto; white-space: pre-wrap;">My Configuration and Env is :</pre><pre style="color: rgb(51, 51, 51); widows: auto; white-space: pre-wrap;"><table class="foxmail_table" cellpadding="0" cellspacing="0"><tbody><tr><td style="border:1px solid #666666;padding:0 4px;min-width:52px;height:32px;text-align:center;white-space:nowrap;"><p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">[postgres@dbk pgp]$ cat /proc/sys/kernel/sem&nbsp;</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">250<span class="Apple-tab-span" style="white-space:pre">        </span>32000<span class="Apple-tab-span" style="white-space:pre">        </span>32<span class="Apple-tab-span" style="white-space:pre">        </span>128</p></td></tr></tbody></table>
</pre><pre style="color: rgb(51, 51, 51); widows: auto; white-space: pre-wrap;">postgres.conf</pre><pre style="color: rgb(51, 51, 51); widows: auto; white-space: pre-wrap;"><p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">max_connections = 2500</p></pre><pre style="color: rgb(51, 51, 51); widows: auto; white-space: pre-wrap;">pgpool.conf</pre><pre style="color: rgb(51, 51, 51); widows: auto; white-space: pre-wrap;"><table class="foxmail_table" cellpadding="0" cellspacing="0"><tbody><tr><td style="text-align: left; border: 1px solid rgb(102, 102, 102); padding: 0px 4px; min-width: 52px; height: 32px; white-space: nowrap;"><p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">listen_addresses = '*'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">port = 9999</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">socket_dir = '/tmp'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">listen_backlog_multiplier = 2</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">pcp_listen_addresses = '*'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">pcp_port = 9898</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">pcp_socket_dir = '/tmp'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">backend_hostname0 = 'pgtest1.xrktest.com'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">backend_port0 = 5432</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">backend_weight0 = 1</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">backend_data_directory0 = '/data/pgdata'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">backend_flag0 = 'ALLOW_TO_FAILOVER'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">backend_hostname1 = 'pgtest2.xrktest.com'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">backend_port1 = 5432</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">backend_weight1 = 1</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">backend_data_directory1 = '/data/pgdata'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">backend_flag1 = 'ALLOW_TO_FAILOVER'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">enable_pool_hba = on</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">pool_passwd = 'pool_passwd'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">authentication_timeout = 60</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">ssl = off</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">num_init_children = 1012</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">max_pool = 4</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">child_life_time = 300</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">child_max_connections = 0</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">connection_life_time = 0</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">client_idle_limit = 0</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">log_destination = 'stderr'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">log_line_prefix = '%t: pid %p: ' &nbsp; # printf-style string to output at beginning of each log line.</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">log_connections = on</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">log_hostname = on</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">log_statement = on</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">log_per_node_statement = off</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">log_standby_delay = 'none'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">syslog_facility = 'LOCAL0'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">syslog_ident = 'pgpool'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">debug_level = 0</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">pid_file_name = '/home/postgres/local/pgpool/var/pgpool.pid'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">logdir = '/home/postgres/local/pgpool/var/pgpool'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">connection_cache = on</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">reset_query_list = 'ABORT; DISCARD ALL'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">replication_mode = off</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">replicate_select = off</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">insert_lock = on</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">lobj_lock_table = ''</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">replication_stop_on_mismatch = off</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">failover_if_affected_tuples_mismatch = off</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">load_balance_mode = on</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">ignore_leading_white_space = on</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">white_function_list = ''</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">black_function_list = 'nextval,setval,nextval,setval'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">database_redirect_preference_list = ''</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">app_name_redirect_preference_list = ''</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">allow_sql_comments = off</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">master_slave_mode = on</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">master_slave_sub_mode = 'stream'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">sr_check_period = 0</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">sr_check_user = 'repuser'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">sr_check_password = 'rep123'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">delay_threshold = 0</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">follow_master_command = ''</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">health_check_period = 0</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">health_check_timeout = 20</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">health_check_user = 'repuser'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">health_check_password = 'rep123'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">health_check_max_retries = 0</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">health_check_retry_delay = 1</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">connect_timeout = 10000</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">failover_command = ''</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">failback_command = ''</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">fail_over_on_backend_error = on</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">search_primary_node_timeout = 10</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">recovery_user = 'repuser'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">recovery_password = 'rep123'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">recovery_1st_stage_command = ''</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">recovery_2nd_stage_command = ''</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">recovery_timeout = 90</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">client_idle_limit_in_recovery = 0</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">use_watchdog = on</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">trusted_servers = ''</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">ping_path = '/bin'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">wd_hostname = 'pgtest1.xrktest.com'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">wd_port = 9000</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">wd_authkey = ''</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">delegate_IP = '192.168.9.190'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">ifconfig_path = '/sbin'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">if_up_cmd = 'ifconfig eth0:0 inet $_IP_$ netmask 255.255.255.0'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">if_down_cmd = 'ifconfig eth0:0 down'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">arping_path = '/usr/sbin' &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # arping command path</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">arping_cmd = 'arping -U $_IP_$ -w 1'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">clear_memqcache_on_escalation = on</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">wd_escalation_command = ''</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">wd_lifecheck_method = 'heartbeat'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">wd_interval = 10</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">wd_heartbeat_port = 9694</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">wd_heartbeat_keepalive = 2</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">wd_heartbeat_deadtime = 30</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">heartbeat_destination0 = 'pgtest2.xrktest.com'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">heartbeat_destination_port0 = 9694&nbsp;</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">heartbeat_device0 = ''</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">wd_life_point = 3</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">wd_lifecheck_query = 'SELECT 1'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">wd_lifecheck_dbname = 'template1'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">wd_lifecheck_user = 'nobody'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">wd_lifecheck_password = ''</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">other_pgpool_hostname1 = 'pgtest2.xrktest.com'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">other_pgpool_port1 = 5432</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">other_wd_port1 = 9000</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">relcache_expire = 0</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">relcache_size = 256</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">check_temp_table = on</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">check_unlogged_table = on</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">memory_cache_enabled = off</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">memqcache_method = 'shmem'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">memqcache_memcached_host = 'localhost'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">memqcache_memcached_port = 11211</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">memqcache_total_size = 67108864</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">memqcache_max_num_cache = 1000000</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">memqcache_expire = 0</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">memqcache_auto_cache_invalidation = on</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">memqcache_maxcache = 409600</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">memqcache_cache_block_size = 1048576</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">memqcache_oiddir = '/var/log/pgpool/oiddir'</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">white_memqcache_table_list = ''</p>
<p style="margin: 0px; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);">black_memqcache_table_list = ''</p></td></tr></tbody></table></pre><pre style="color: rgb(51, 51, 51); widows: auto; white-space: pre-wrap;"><br></pre><pre style="color: rgb(51, 51, 51); widows: auto; white-space: pre-wrap;">I realy don’t know where am i wrong. </pre><pre style="color: rgb(51, 51, 51); widows: auto; white-space: pre-wrap;">The test result is very bad. (Lost 70% of the tps)</pre><pre style="color: rgb(51, 51, 51); widows: auto; white-space: pre-wrap;"><br></pre><pre style="color: rgb(51, 51, 51); widows: auto; white-space: pre-wrap;">Is there something I can do to improve it?</pre><pre style="color: rgb(51, 51, 51); widows: auto; white-space: pre-wrap;"><br></pre></div><div class="sign" style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif !important; line-height: 22px; color: rgb(51, 51, 51); widows: 1; padding: 20px 10px;"><div class="contact" style="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></div></div></div></div><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;<a href="mailto:ishii@postgresql.org" title="mailto:ishii@postgresql.org">ishii@postgresql.org</a>&gt;</div><div><b style="color:#999;">收件人:</b>&nbsp;liujinfei&lt;<a href="mailto:liujinfei@xiangrikui.com" title="mailto:liujinfei@xiangrikui.com">liujinfei@xiangrikui.com</a>&gt;</div><div><b style="color:#999;">抄送:</b>&nbsp;pgpool-general&lt;<a href="mailto:pgpool-general@pgpool.net" title="mailto:pgpool-general@pgpool.net">pgpool-general@pgpool.net</a>&gt;</div><div><b style="color:#999;">发送时间:</b>&nbsp;2015年8月10日(周一) 13:46</div><div><b style="color:#999;">主题:</b>&nbsp;Re: [pgpool-general: 3942] Re: pgpool establish new connection tooslow</div></div><br><div class="mail_quote_F0EF6024CD8445328D79FEA0CF4F0619" style="font: 14px/1.5 'Lucida Grande';color:#333;"><pre style="white-space:pre-wrap;">&gt;&gt; pgpool :   192.168.9.132 (master), 192.168.9.133(slaver)
&gt;&gt; postgresql: 192.168.9.132 (slaver),  192.168.9.133(master)
&gt;&gt; pgbench   192.168.9.203
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; When i test with postgresql, it cost a little time ( 5 seconds) to establish new connection.
&gt; 
&gt; I assume you run pgbench on 192.168.9.203.
&gt; 
&gt; So one PostgreSQL server spends 5 seconds for opening 1024
&gt; connections. Because you have two PostgreSQL servers spending 10
&gt; seconds to open 1024 connections to both PostgreSQL. But still extra
&gt; 10 seconds does not explain. Let me think it about...

One possible explanation is, 192.168.9.132 does not have enough
CPU/memory resource to handle 2048 process (1024 pgpool-II + 1024
PostgreSQL). For example 2048 process will produce significant context
switches which in turn gives high CPU load. Can you add more resource
to the server?

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></div></div>