<div dir="ltr">Why I turn off the <span style="font-family:arial,sans-serif;font-size:13px">connection_cache is because we have tomcat to cache the connections, according to clients&#39; requirements. We use java code to bulk update the table. But for the code details, I have no idea about it.</span></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 2, 2014 at 7:20 AM, Tatsuo Ishii <span dir="ltr">&lt;<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">One thing I noticed is you turn off connection_cache which will<br>
descease performance. Is there any specific reason for this? Also what<br>
kind of application/language you are running?<br>
<br>
Best regards,<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese: <a href="http://www.sraoss.co.jp" target="_blank">http://www.sraoss.co.jp</a><br>
<div class="HOEnZb"><div class="h5"><br>
&gt; Hello you,<br>
&gt;<br>
&gt; I am a freshman to postgresql, also pgpool-II. I have some performance<br>
&gt; issues once I bring in the pgpool-II to build the pg cluster. Here I post<br>
&gt; some system info and the configurations of postgresql and pgpool, hopping<br>
&gt; you can help me to solve this problem.<br>
&gt;<br>
&gt; BTW, I am using the postgres 9.2.4 installed on the Amazon AWS with debian<br>
&gt; OS(64bits), and the version of pgpool is 3.2.7. There are two nodes in the<br>
&gt; cluster, working in master/slave mode and replicating data using the<br>
&gt; streaming replication feature.<br>
&gt;<br>
&gt; Mem info:<br>
&gt; cora@apollo:~$ free<br>
&gt;              total       used       free     shared    buffers     cached<br>
&gt; Mem:      31446876    7625428   23821448          0       9468    6312080<br>
&gt; -/+ buffers/cache:    1303880   30142996<br>
&gt; Swap:            0          0          0<br>
&gt;<br>
&gt; Linux info:<br>
&gt; cora@apollo:~$ cat /proc/version<br>
&gt; Linux version 2.6.32-5-xen-amd64 (Debian 2.6.32-48squeeze1) (<br>
&gt; <a href="mailto:dannf@debian.org">dannf@debian.org</a>) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Mon Feb 25<br>
&gt; 02:51:39 UTC 2013<br>
&gt;<br>
&gt; The settings of postgresql(only showing the non-default parameters)<br>
&gt; listen_addresses = &#39;*&#39;<br>
&gt; port = 9797<br>
&gt; max_connections = 750<br>
&gt; ssl_renegotiation_limit = 0<br>
&gt; shared_buffers = 15GB<br>
&gt; temp_buffers = 32MB<br>
&gt; work_mem = 64MB<br>
&gt; maintenance_work_mem = 128MB<br>
&gt; effective_io_concurrency = 1000<br>
&gt; wal_level = hot_standby<br>
&gt; checkpoint_segments = 32<br>
&gt; archive_mode = on<br>
&gt; archive_command = &#39;rsync -a %p apollo:/var/lib/postgresql/9.2/archive/%f<br>
&gt; &lt;/dev/null&#39;<br>
&gt; max_wal_senders = 1<br>
&gt; wal_keep_segments = 32<br>
&gt; hot_standby = on<br>
&gt; enable_indexscan = on<br>
&gt; enable_seqscan = on<br>
&gt; random_page_cost = 2.0<br>
&gt; effective_cache_size = 5GB<br>
&gt; default_statistics_target = 10000<br>
&gt; constraint_exclusion = on<br>
&gt; autovacuum = on<br>
&gt; log_autovacuum_min_duration = 100<br>
&gt; autovacuum_max_workers = 6<br>
&gt; autovacuum_naptime = 30min<br>
&gt; autovacuum_vacuum_threshold = 1000<br>
&gt; autovacuum_analyze_threshold = 5000<br>
&gt; autovacuum_vacuum_scale_factor = 0.2<br>
&gt; autovacuum_analyze_scale_factor = 0.1<br>
&gt; autovacuum_freeze_max_age = 200000000<br>
&gt; autovacuum_vacuum_cost_delay = 20ms<br>
&gt; autovacuum_vacuum_cost_limit = -1<br>
&gt; hot_standby_feedback = off<br>
&gt;<br>
&gt;<br>
&gt; The configuration of pgpool-II<br>
&gt; listen_addresses = &#39;*&#39;<br>
&gt; port = 5432<br>
&gt; socket_dir = &#39;/var/run/pgpool2&#39;<br>
&gt; pcp_port = 9898<br>
&gt; pcp_socket_dir = &#39;/var/run/pgpool2&#39;<br>
&gt; backend_hostname0 = &#39;apollo&#39;<br>
&gt; backend_port0 = 9797<br>
&gt; backend_weight0 = 1<br>
&gt; backend_data_directory0 = &#39;/var/lib/postgresql/9.2/main&#39;<br>
&gt; backend_flag0 = &#39;ALLOW_TO_FAILOVER&#39;<br>
&gt;<br>
&gt; backend_hostname1 = &#39;apollo2&#39;<br>
&gt; backend_port1 = 9797<br>
&gt; backend_weight1 = 1<br>
&gt; backend_data_directory1 = &#39;/var/lib/postgresql/9.2/main&#39;<br>
&gt; backend_flag1 = &#39;ALLOW_TO_FAILOVER&#39;<br>
&gt; enable_pool_hba = on<br>
&gt; pool_passwd = &#39;pool_passwd&#39;<br>
&gt; ssl = off<br>
&gt; num_init_children = 32<br>
&gt; max_pool = 5<br>
&gt; child_life_time = 0<br>
&gt; child_max_connections = 0<br>
&gt; connection_life_time = 0<br>
&gt; client_idle_limit = 0<br>
&gt; debug_level = 0<br>
&gt; pid_file_name = &#39;/var/run/pgpool2/pgpool.pid&#39;<br>
&gt; logdir = &#39;/var/log/pgpool2&#39;<br>
&gt; connection_cache = off<br>
&gt; replication_mode = off<br>
&gt; insert_lock = off<br>
&gt; replicate_select = off<br>
&gt; load_balance_mode = on<br>
&gt; ignore_leading_white_space = on<br>
&gt; white_function_list = &#39;foo&#39;<br>
&gt; black_function_list = &#39;&#39;<br>
&gt; master_slave_mode = on<br>
&gt; master_slave_sub_mode = &#39;stream&#39;<br>
&gt; sr_check_user = &#39;postgres&#39;<br>
&gt; sr_check_password = &#39;×××&#39;<br>
&gt; delay_threshold = 0<br>
&gt; health_check_period = 10<br>
&gt; health_check_timeout = 20<br>
&gt; failover_command = &#39;/var/lib/postgresql/9.2/main/failover.sh %d &quot;%h&quot; %p %D<br>
&gt; %m %M &quot;%H&quot; %P&#39;<br>
&gt; failback_command = &#39;/bin/rm -f /tmp/trigger_file0&#39;<br>
&gt; recovery_user = &#39;postgres&#39;<br>
&gt; recovery_password = &#39;postgres&#39;<br>
&gt; recovery_1st_stage_command = &#39;basebackup.sh&#39;<br>
&gt; use_watchdog = off<br>
&gt;<br>
&gt; At first, I turn on the hot_standby_feedback, but after getting customers&#39;<br>
&gt; complaint about the poor performance, I decide to turn off, but it seems<br>
&gt; that it didn&#39;t help.<br>
&gt;<br>
&gt; Thanks in advance.<br>
&gt;<br>
&gt; --<br>
&gt; Thanks,<br>
&gt; Cora<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Thanks,<div>Cora</div></div>
</div>