Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bfC3V-0003jT-LL for pgsql-admin@arkaria.postgresql.org; Wed, 31 Aug 2016 20:24:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bfC3V-0004At-89 for pgsql-admin@arkaria.postgresql.org; Wed, 31 Aug 2016 20:24:17 +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_2) (envelope-from ) id 1bfC1n-0001fV-AX for pgsql-admin@postgresql.org; Wed, 31 Aug 2016 20:22:31 +0000 Received: from www.ipv6.roaringpenguin.com ([2607:f748:1200:fb:70:38:112:54] helo=colo3.roaringpenguin.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bfC1k-0005bx-97 for pgsql-admin@postgresql.org; Wed, 31 Aug 2016 20:22:30 +0000 Received: from vanadium.roaringpenguin.com ([192.168.10.23]) by colo3.roaringpenguin.com (8.14.4/8.14.4/Debian-8) with ESMTP id u7VKMPVF024716 for ; Wed, 31 Aug 2016 16:22:25 -0400 Received: from hydrogen.roaringpenguin.com (dfs@hydrogen.roaringpenguin.com [192.168.10.1]) by vanadium.roaringpenguin.com (8.14.4/8.14.4/Debian-8) with ESMTP id u7VKMMFb003279 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Wed, 31 Aug 2016 16:22:22 -0400 Date: Wed, 31 Aug 2016 16:22:22 -0400 From: Dianne Skoll To: pgsql-admin Subject: Re: What causes streaming replication delay? [SOLVED, I think] Message-ID: <20160831162222.21288e76@hydrogen.roaringpenguin.com> In-Reply-To: <20160831131604.0f305404@hydrogen.roaringpenguin.com> References: <20160831114417.7fc1040d@hydrogen.roaringpenguin.com> <20160831131604.0f305404@hydrogen.roaringpenguin.com> Organization: Roaring Penguin Software Inc. X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: CanIt (www . roaringpenguin . com) X-Scanned-By: MIMEDefang 2.78 on 192.168.10.23 X-Spam-Score: undef - relay 192.168.10.23 marked with skip_spam_scan X-CanIt-Geo: No geolocation information available for 192.168.10.23 X-CanItPRO-Stream: outgoing (inherits from default) X-CanIt-Archive-Cluster: SQVyZJxqklY5buiWXYCN4T/BjiM X-CanIt-Archived-As: base/20160831 / 01RBUmpve DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=roaringpenguin.com; h= date:from:to:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=canit; bh=eh2zrRfJWE/l3YqmPcj4D1XT7W7Ucvs0F6N2deN4reQ=; b=K0JnR1YAlv9G ObUCn+RU2m32G7k3RX8bLePpoYrv9EcwWTtEv71d8XsXyWOydLItAZL7QNPWlFez Gaw9wfIPMphzEo56SBrsxKb6gf5LqA0QgNslXzoCo8eeumjAM63EIdFy0Z10YA5n EnbIMwhfTY1wuYbeeuGXACvkHN+Joq4EK2i5RkE33WsK13nUSzqJyotDutNTYl5g FORBjEIES4Aw2jhowqR3d8WZuzHPN3wNS2piQyfY1W6YMDBcYkIWnehx2kg4r0Iq T+IfLnDway68dklXu6Clzc4giWWbfTZUR/rRL/ePjFXVHBS9/uDCvhHtChlzYUSg LtuwE0QxlQ== X-Pg-Spam-Score: -8.5 (--------) 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 Hi, I think I solved it. This is so ridiculous! The primary and standby databases are 200km apart and the path between them has a bandwidth of only 100 Mb/s. We had bursts of writes that created huge amounts of replication traffic. In addition to streaming replication, we're still copying WAL files over for safety (and also because this is 9.1...) We were hitting our bandwidth limit. By adding the --bwlimit parameter to the rsync command that copies the WAL files, we can limit the bandwidth usage during the bursts while still keeping it high enough for the WAL-file archiving to keep up on average. Keeping an eye on it for 24h before I completely declare it solved. Regards, Dianne. -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin