Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jWL1g-0000zj-2J for pgsql-general@arkaria.postgresql.org; Wed, 06 May 2020 14:27:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jWL1e-0005oh-FO for pgsql-general@arkaria.postgresql.org; Wed, 06 May 2020 14:27:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jWL1c-0005oI-KL for pgsql-general@lists.postgresql.org; Wed, 06 May 2020 14:27:54 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jWL1Z-0002rk-Ly for pgsql-general@lists.postgresql.org; Wed, 06 May 2020 14:27:51 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 4BBAA5C0108; Wed, 6 May 2020 10:27:48 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 06 May 2020 10:27:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=h VIbCV3zQisdRgETzmUucbHMFGNobYTuZECyvF9LhPE=; b=bkMtsNYgCrIfFHXUr zbaTmA+IOa0LjnJydKFzDZ/W4jc/dxRrVMgldX0t4dAcA7XOthusBp1J8EyLQDGg Tw5IN7QvuCeNkCKoO3q9B/oIy0Zl3y3WVHJ0rCzFimvAmARjF2YYP4mhqwe/C48O eTVqx9n/Q+SsVRxHppRvDY2+6v5wxQcErDhkh7Dqar5HDq3C0Cf4QLN866eotcg7 Q3Uu1/xfQGvfY5l5+HxHY1bjdiZsLz91WPMea7H4bfX4iyHOBnmJR0F2HFXn0JzL pzvR9AdSoFOMEzIpMys8t/eO6kg9Pi4m99Kdv5ZckTTqeMEjNbzUg2lXkyxZKkqk 5Du3w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=hVIbCV3zQisdRgETzmUucbHMFGNobYTuZECyvF9Lh PE=; b=itrWOmVWQII4Kqa+6u03cGG8lzy3j4YYrQnSCBoB/6DYdKkCeAKBun5Kj 6TkVrnp2yt5vuGikXhqcrjrhvNmnKuLKHgtJITic6cYew5tSHr53UZ4c74DJhG2e ScUuKxBco0qV7uzJnog/ZtCxxnDm+YhI+Ecu5pucKLJlwRM4feO2vk4Km8GdW3fD qY5epjNz/hrMKlejez0tykVOXxval68EPoC/+ojl+MZzoCEEtDXGhc2kPFietfVM N+N4R0JomNVWT7Ig1WTi6qKtmV1py3EPGrCrda0bAInOb9QOGgxQCMdzCAhZlxco GHK4knWgYGhhialkk3IVTdUV85EVg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrjeekgdejgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeehnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecuggftrfgrthhtvghrnhepvdekhfehhfelkeejueeuleehvdegjeefheelffethfdt fefffeegteffgfehfeffnecukfhppeejhedrudejvddrhedrvdefudenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghv vghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from [192.168.1.3] (75-172-5-231.tukw.qwest.net [75.172.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id 601C2328006E; Wed, 6 May 2020 10:27:47 -0400 (EDT) Subject: Re: pg_basebackup inconsistent performance To: Jasen Lentz , "pgsql-general@lists.postgresql.org" References: From: Adrian Klaver Message-ID: <08b7392c-6ff2-ae3f-93c5-b3b771891b10@aklaver.com> Date: Wed, 6 May 2020 07:27:46 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 5/6/20 5:44 AM, Jasen Lentz wrote: > We have pg_basebackup running on two of our DB servers that are > replicated.  We are running postgres 11, and it seems we are getting > inconsistent performance from the backups and unsure as of why.  We > start out at 5-6 hours over a dedicated 10G port for 7TB.  It creeps up > to 8-9 hours then all of a sudden takes 12-16 hours.  There seems to be I'm guessing the above happens from one run to another correct? Where are the machines you are backing up from/to relative to each on the network? Is there increased activity on the database servers e.g. inserts, updates, etc during the extended backups? > no rhyme or reason for the extended backup times.  The command we use > for backups is as follows: > > On server 2 (secondary), starts at 4PM > > pg_basebackup --pgdata=/opt/postgres/pgbackup/`echo $DATE` > --format=plain --write-recovery-conf --no-sync --wal-method=stream > --checkpoint=fast --label=`hostname`-`echo $DATE` --no-verify-checksums > --host= --username=replication --port=5432 > > On server 1 (Primary), starts at Midnight > > pg_basebackup --pgdata=/opt/postgres/pgbackup/`echo $DATE` > --format=plain --write-recovery-conf --no-sync --wal-method=stream > --checkpoint=fast --label=`hostname`-`echo $DATE` --no-verify-checksums > --host= --username=replication --port=5432 > > I’m not sure why or how we are running into the weeds.  I am the > SysAdmin and am not familiar with the inner workings of the DB.  I can > pass any commands that need run along to our DBA. > > From the OS perspective, we are not seeing any problems with CPU, > memory or disk.  We are running on RHEL 7.7 > > Thanks! > -- Adrian Klaver adrian.klaver@aklaver.com