Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aWT3T-0001l9-8d for pgsql-admin@arkaria.postgresql.org; Thu, 18 Feb 2016 18:11:55 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aWT3S-0000zA-RI for pgsql-admin@arkaria.postgresql.org; Thu, 18 Feb 2016 18:11:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aWT1n-0007UY-6o for pgsql-admin@postgresql.org; Thu, 18 Feb 2016 18:10:11 +0000 Received: from imx6.etecsa.cu ([200.55.152.141]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1aWT1h-0004Ph-TU for pgsql-admin@postgresql.org; Thu, 18 Feb 2016 18:10:10 +0000 Received: from mn3.etecsa.cu (unknown [192.168.91.45]) by imx6.etecsa.cu (Postfix) with ESMTP id 62445AE for ; Thu, 18 Feb 2016 13:10:01 -0500 (CST) Received: (qmail 5547 invoked by uid 11185); 18 Feb 2016 18:09:58 -0000 Received: from 192.168.91.6 by mn3.etecsa.cu (envelope-from , uid 502) with qmail-scanner-2.08 (spamassassin: 3.2.5. Clear:RC:1(192.168.91.6):. Processed in 0.062586 secs); 18 Feb 2016 18:09:58 -0000 Received: from unknown (HELO webmail.etecsa.cu) ([192.168.91.6]) (envelope-sender ) by mn2.etecsa.cu (qmail-ldap-1.03) with SMTP for ; 18 Feb 2016 18:09:58 -0000 Received: from 192.168.207.54 (SquirrelMail authenticated user gilberto.castillo) by webmail.etecsa.cu with HTTP; Thu, 18 Feb 2016 13:10:01 -0500 (GMT+5) Message-ID: <47625.192.168.207.54.1455819001.squirrel@webmail.etecsa.cu> In-Reply-To: References: Date: Thu, 18 Feb 2016 13:10:01 -0500 (GMT+5) Subject: Re: [MASSMAIL]Re: [TIPS] Tuning PostgreSQL 9.2 From: "Gilberto Castillo" To: "Scott Marlowe" Cc: "drum.lucas@gmail.com" , "pgsql-admin@postgresql.org" Reply-To: gilberto.castillo@etecsa.cu User-Agent: SquirrelMail/1.4.8-5.el5_4.10 MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-KLMS-Rule-ID: 1 X-KLMS-Message-Action: clean X-KLMS-AntiSpam-Lua-Profiles: 91513 [Feb 18 2016] X-KLMS-AntiSpam-Version: 5.5.9.33 X-KLMS-AntiSpam-Envelope-From: gilberto.castillo@etecsa.cu X-KLMS-AntiSpam-Rate: 0 X-KLMS-AntiSpam-Status: not_detected X-KLMS-AntiSpam-Method: none X-KLMS-AntiSpam-Moebius-Timestamps: 3970083, 3970282, 3969585 X-KLMS-AntiSpam-Info: LuaCore: 414 414 652141367f63b6038f5642fa97308d3a9d2edb46, Auth:dkim=none X-KLMS-AntiSpam-Interceptor-Info: scan successful X-KLMS-AntiPhishing: Clean, 2016/02/18 11:55:00 X-KLMS-AntiVirus: Kaspersky Security 8.0 for Linux Mail Server, version 8.0.1.721, bases: 2016/02/18 11:09:00 #7187872 X-KLMS-AntiVirus-Status: Clean, skipped X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Hello Use pgtuning in you server. > On Wed, Feb 17, 2016 at 6:03 PM, drum.lucas@gmail.com > wrote: >> Hi all, >> >> Trying to improve the performance, it would be great hear from you some >> tips >> to it... >> >> My current scenario is: >> 128 GB Ram - Raid 10 - PostgreSQL 9.2 in a Centos 6.6 64 Bits >> >> How could I measure a nice parameter to it? >> Can you guys tell your experience and how did you get nice results with >> your >> changes? >> >> But biggest problem nowadays are slow queries and I/O (In some spikes I >> get >> 100% I/O usage) >> >> Thank you! >> >> Current confs: >> 1 - Newrelic >> 2 - pg_stat_statements = on >> 3 - log_min_duration_statement = 1000 >> 4 - log_statement = 'ddl' >> 5 - Munin >> 6 - Vaccum: >>> >>> vacuum_cost_delay = 20ms >>> vacuum_cost_page_hit = 1 >>> vacuum_cost_page_miss = 10 >>> vacuum_cost_page_dirty = 20 >>> vacuum_cost_limit = 100 >>> autovacuum = on >>> log_autovacuum_min_duration = 30000 >>> autovacuum_max_workers = 2 >>> autovacuum_naptime = 1min >>> autovacuum_vacuum_threshold = 500 >>> autovacuum_analyze_threshold = 500 >>> autovacuum_vacuum_scale_factor = 0.1 >>> autovacuum_analyze_scale_factor = 0.1 >>> autovacuum_freeze_max_age = 200000000 >>> autovacuum_vacuum_cost_delay = -1 >>> autovacuum_vacuum_cost_limit = -1 >>> vacuum_freeze_min_age = 50000000 >>> vacuum_freeze_table_age = 150000000 >> >> >> shared_buffers = 51605MB >> work_mem = 32MB >> maintenance_work_mem = 128 MB >> effective_cache_size = 96760MB > > There are a lot of things you can do to improve performance, but we > don't know your usage patterns or underlying IO subsystem. What does > your IO sybsystem look like? How fast can you get something like > pgbench to go on this machine? > > Might I ask where the idea for shared_buffers being 51GB came from? > Generally speaking shared_buffers don't work well that big, except in > some very specific circumstances maybe. > > So when you say IO is 100% utilized, is that being used by sorts, the > background writer, reads? > > How many active and idle connections do you typically have on this > machine? If you have a lot of connections have you considered pooling? > > What are max_connections, effective_io_concurrency, ramdom_page_cost, > wal_writer_delay, commit_delay, commit_siblings, checkpoint_segments, > temp_buffers, set to? > > Turn on things like log_temp_files, log_checkpoints. > > Also got a slow query and an explain analyze output? > > > -- > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin > -- Saludos, Gilberto Castillo ETECSA, La Habana, Cuba -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin