Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpUcS-0001FB-B4 for pgsql-general@arkaria.postgresql.org; Mon, 22 Jul 2019 09:28:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hpUcQ-0007R2-QY for pgsql-general@arkaria.postgresql.org; Mon, 22 Jul 2019 09:28:30 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpUcQ-0007HK-EE for pgsql-general@lists.postgresql.org; Mon, 22 Jul 2019 09:28:30 +0000 Received: from smtp6-g21.free.fr ([2a01:e0c:1:1599::15]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpUcM-0005wA-31 for pgsql-general@lists.postgresql.org; Mon, 22 Jul 2019 09:28:27 +0000 Received: from firost (unknown [90.38.33.32]) (Authenticated sender: ioguix) by smtp6-g21.free.fr (Postfix) with ESMTPSA id 459B3780304; Mon, 22 Jul 2019 09:28:20 +0000 (UTC) Date: Mon, 22 Jul 2019 11:27:54 +0200 From: "Jehan-Guillaume (ioguix) de Rorthais" To: Tiemen Ruiten Cc: pgsql-general@lists.postgresql.org Subject: Re: very high replay_lag on 3-node cluster Message-ID: <20190722112754.512b4840@firost> In-Reply-To: References: X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On Mon, 22 Jul 2019 11:05:57 +0200 Tiemen Ruiten wrote: [...] > > Now to my current issue: I took the advice to add more monitoring on > > replay lag (using pg_last_xact_replay_timestamp) and things are not looking > > good. Last night replication lagged by almost 6 hours on one of the > > nodes[3], but eventually caught up. As you can see in that screenshot, > > ph-sql-03 is consistently slower to replay than ph-sql-05 (ph-sql-04 is the > > current master) and there happen to be different SSD's in ph-sql-03 > > (Crucial MX300 vs Crucial MX500 in the other two), which makes me think > > this is IO related. Such a difference is quite surprising. Moreover, I suppose you have some caching in front of disks (either RAID or SAN?). Could you describe your disk stack with more details? Do you have any detailed metrics about disks and network IO to share? The network is the same for both nodes?