Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tSIUm-00FVHj-SU for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Dec 2024 16:19:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tSIUl-00CuZ0-2u for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Dec 2024 16:19:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tSIUk-00CuYr-Na for pgsql-hackers@lists.postgresql.org; Mon, 30 Dec 2024 16:19:54 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tSIUh-002Mua-GS for pgsql-hackers@postgresql.org; Mon, 30 Dec 2024 16:19:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2024011501; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=dD+MCidRFqa0Rk+6aoht2HqWtA7QhHjXChZ4YvUfcRE=; b=kG5uW QGeWavBB4aEDLKO8H/gSYTdXzhz9/Axv/kucaDo65TXH1o+aN5BPwcVLitX+QIDUP7nKk5DY0cCP2 SzkC0zRnvkzvbDROfJ+pYVlnP1m6Gx65DC5f0gtwy/Pxb46QNK7quoX4EnKZ8cetUHA0PjJ9fjRAF /hOTBxUW16c8aCmIxT6qBu91mqt6ge9LcVnP3hCZQirYFrPNrNoliUNrpOp8MFiVEE5G1q0zQLbU0 uN6LEC5A+A/96mqX9Ml934gJlSTeWKXFv4mcdGvc2PbWb8Rb7ahOZOhMOET5uw9M7DkWt/HKaWwuw TM8Uq7R2VqP22/ipCSOEwOs8k9pFQ==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1tSIUd-006aD0-1g; Mon, 30 Dec 2024 11:19:47 -0500 Date: Mon, 30 Dec 2024 11:19:47 -0500 From: Bruce Momjian To: Jelte Fennema-Nio Cc: Tom Lane , torikoshia , Pgsql Hackers Subject: Re: RFC: Allow EXPLAIN to Output Page Fault Information Message-ID: References: <1614321.1735055528@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Dec 27, 2024 at 03:15:40PM +0100, Jelte Fennema-Nio wrote: > On Tue Dec 24, 2024 at 4:52 PM CET, Tom Lane wrote: > > torikoshia writes: > > > I have attached a PoC patch that modifies EXPLAIN to include page > > > fault information during both the planning and execution phases of a > > > query. > > > > Surely these numbers would be too unstable to be worth anything. > > What makes you think that? I'd expect them to be similarly stable to the > numbers we get for BUFFERS. i.e. Sure they won't be completely stable, > but I expect them to be quite helpful when debugging perf issues, > because large numbers indicate that the query is disk-bound and small > numbers indicate that it is not. > > These numbers seem especially useful for setups where shared_buffers is > significantly smaller than the total memory available to the system. In > those cases the output from BUFFERS might give the impression that that > you're disk-bound, but if your working set still fits into OS cache then > the number of page faults is likely still low. Thus telling you that the > numbers that you get back from BUFFERS are not as big of a problem as > they might seem. I certainly would love to see storage I/O numbers as distinct from kernel read I/O numbers. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Do not let urgent matters crowd out time for investment in the future.