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 1iK8dW-0006qM-1N for pgsql-performance@arkaria.postgresql.org; Mon, 14 Oct 2019 22:16:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iK8dT-0004I5-Nm for pgsql-performance@arkaria.postgresql.org; Mon, 14 Oct 2019 22:16:15 +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 1iK8dT-0004Hq-9j for pgsql-performance@lists.postgresql.org; Mon, 14 Oct 2019 22:16:15 +0000 Received: from mail-io1-xd41.google.com ([2607:f8b0:4864:20::d41]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iK8dL-0005Lc-Lx for pgsql-performance@postgresql.org; Mon, 14 Oct 2019 22:16:14 +0000 Received: by mail-io1-xd41.google.com with SMTP id q10so41498588iop.2 for ; Mon, 14 Oct 2019 15:16:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=L9Qx0NwEVWufdjFho3riG+l53wTgHGLzb/FpGKS+Zs8=; b=IPvcAR+VMzbXTgYXSiI1fRasFVmIBqNEld4AHIz5ZES/Ecixm76LHHmx2kktVHKX8f Okw3m9IqjIf+4wkzC0Cw4BoJLbIB5WWEPdtRvvgY4+GRJ4Tb06njBfya/wLx8n7NbS8X mrRM5IN/GW9Q/64x6hE63swJocek700JzBAhhQcYlLO2hCZ85pDMv0/zOTJEouILPLLI HTWYFYw/TviU4qsvM9xzbSWi7XQ034jzR5KP99sKHDH3i7BeXlB5U/sR8vZk/9WDJ5ok V/URtjoARXpnSxEYmWlI+o7heMqwlwTMDNkIHpS+Ncvwj9piiYJq0UWIb98qWSqLnRHA hA2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=L9Qx0NwEVWufdjFho3riG+l53wTgHGLzb/FpGKS+Zs8=; b=T0JksE4iiGQqan0/q2lu2cb1TJi1ZeoEBMf1CQpUWbjJSKUPj36L6VSYulKF7GW6YR KxYTIUwnwwPJQ2xAfLra7QzOJMrf5FhBpTolPToeo/lmTS8uoqd44UOxiikRb0v+d7pa 29xEOGu0RJAa/W0UUYPhUJfGi29Rz9DuQ3wAtUTJraKA/V0oQYip1OO/raSEB/PtLyJN zdPHEQrvdkbdqrdTiE7Ky4n6tMd4cC7as85MRQv4Nm9wB04gFJG6Itc17m+ZHqCyVZmd vnqOk+cOxjml1U5gQMdYFBNwUkrgpqKX/2fU8kV1N8oQNdCK6XwhXqJGjXYOZPd2hhxW qmFg== X-Gm-Message-State: APjAAAW0Vb+EtzpzddajFEoyP67V9NBVAUdBY5bgbhjPpXdFuntESIDs M7PBN0z8KSmzIxO/evs4vPRtd/bF+xY= X-Google-Smtp-Source: APXvYqxDlwMddteS6jxYIh6EbnvUbj/CyBZhd33R7AYvMa/lf60cBdQmmh8lMcWfjviqZIXTrQ3Xfw== X-Received: by 2002:a6b:740b:: with SMTP id s11mr40171256iog.294.1571091365787; Mon, 14 Oct 2019 15:16:05 -0700 (PDT) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id e139sm15405712iof.60.2019.10.14.15.16.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Oct 2019 15:16:04 -0700 (PDT) Received: by pryzbyj (Postfix, from userid 1000) id 1097F8011CB; Mon, 14 Oct 2019 17:16:03 -0500 (CDT) Date: Mon, 14 Oct 2019 17:16:02 -0500 From: Justin Pryzby To: Tomas Vondra Cc: dangal , pgsql-performance@postgresql.org Subject: Re: pg_stat_bgwriter Message-ID: <20191014221602.GL3599@telsasoft.com> References: <1571016455698-0.post@n3.nabble.com> <20191014181847.6lf5s3fwuh7ui25r@development> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191014181847.6lf5s3fwuh7ui25r@development> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Oct 14, 2019 at 08:18:47PM +0200, Tomas Vondra wrote: > Note: FWIW, a single snapshot of pg_stats* may be misleading, because > it's cumulative, so it's not clear how accurately it reflects current > state. Next time take two snapshots and subtract them. For bonus points, capture it with timestamp and make RRD graphs. I took me awhile to get around to following this advice, but now I have 12+ months of history at 5 minute granularity across all our customers, and I've used my own implementation to track down inefficient queries being run periodically from cron, and notice other radical changes in writes/reads I recall seeing that the pgCluu project does this. http://pgcluu.darold.net/ Justin