Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1buCeE-0003fx-Pf for pgsql-performance@arkaria.postgresql.org; Wed, 12 Oct 2016 06:04:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1buCeE-0008Kg-CY for pgsql-performance@arkaria.postgresql.org; Wed, 12 Oct 2016 06:04:14 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1buCeD-0008Ju-Az for pgsql-performance@postgresql.org; Wed, 12 Oct 2016 06:04:13 +0000 Received: from mimolette.dalibo.net ([212.85.157.144] helo=mail.dalibo.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1buCe5-0000Lq-L6 for pgsql-performance@postgresql.org; Wed, 12 Oct 2016 06:04:12 +0000 Received: from nol.local (aur75-1-78-192-238-147.fbxo.proxad.net [78.192.238.147]) by mail.dalibo.com (Postfix) with ESMTPSA id CC1162C0132; Wed, 12 Oct 2016 08:04:01 +0200 (CEST) Subject: Re: Delay in converting logs from ready state to done state To: Samir Magar , pgsql-performance@postgresql.org References: From: Julien Rouhaud Message-ID: Date: Wed, 12 Oct 2016 08:03:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On 12/10/2016 07:26, Samir Magar wrote: > Team, > > we are seeing delay in converting logs from ready state to done state in > pg_xlog archive status. > > we have seen pg_xlog generated 2000 per hour and it is getting archived > 1894. So the speed at which the archiving is done is too slow as compare > to the pg_xlog generation > > So our pg_xlog directory keeps filling regularly. What should be the > real cause here? > > We cannot see any specific error on pg_log except no space left on device. > > > > current setting: > > wal_level = archive > > archive_mode = on > > max_wal_senders = 3 > > archive_command = 'gzip < %p > /pgarchive/%f' > You could use pigz which is parallel, that could speed up compression. > checkpoint_segments = 3 > this is way to low. If you generate 2000 WAL per hour, you should configure it to something like 170 (or 5 min average if 2000 is a spike). It'll perform less checkpoint and also generate less WALs. -- Julien Rouhaud http://dalibo.com - http://dalibo.org -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance