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 1tRB80-007oRH-8l for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Dec 2024 14:15:49 +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 1tRB7z-00AWVz-IN for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Dec 2024 14:15:47 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tRB7z-00AWVr-49 for pgsql-hackers@lists.postgresql.org; Fri, 27 Dec 2024 14:15:46 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tRB7w-000oIr-0b for pgsql-hackers@postgresql.org; Fri, 27 Dec 2024 14:15:45 +0000 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-aaef00ab172so467326466b.3 for ; Fri, 27 Dec 2024 06:15:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeltef.nl; s=google; t=1735308942; x=1735913742; darn=postgresql.org; h=in-reply-to:references:from:to:subject:cc:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=qaEBHhhcrraILdrVwDwcmN71J6ZLkwD8Xc8m+Q0g2Mc=; b=RLoqqujqpKd8X4oTCjYQCLJuUMCgx6UkrN/v37OLGgL8hTE9cwMf2tD1XVF+P0vkYZ tmNcfmScQrLME841yFzLn6p4M2mPCQVE8BpB+RJb+D5eU2+ql9GSTCqXlQdh600Ne3o4 gJItgTTF27mMQO9yzZUiA4Z50LJ7Ai8q1Pi3NeHn+8O9DjbP1JQCEVVx++lDV/EHXf6K N+ldgBrRDotyONHXSUvFSkeuCsmotSwWE7hP3oJxtyEaP493Hqx9gEkndvYkUg5fNIhI Il0PPbK42Osgv7hiluLy4YEQ7asHqAOpgpYn4Gpe//kTDJ3eo5vz1B0IAL22jI+DkwhU 8+LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735308942; x=1735913742; h=in-reply-to:references:from:to:subject:cc:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=qaEBHhhcrraILdrVwDwcmN71J6ZLkwD8Xc8m+Q0g2Mc=; b=JBfYSKHK441z+xf64Auhex/dwW2eaYQmwDjFOwZr3ajShSE/xzau2zITUn++8QFuJH FSVNAlq+Lz7LnG2RZl27icP3Wgo+cT0JMxRmdi7kJ/LkOkgVSn9w14+rWKcLltNf89Ns BfcRTKLom8IV74yD6NQnnNMRbYxLUgCHtT635OWMJXe5jz2HQw3+RgGb0TNnVSEQwpWJ VJz3WozDarJ6pCKG0ZZHZBmmolRYfrUxbMggWLPAa4CSPYURamEpOynJ4M7zF/npsd6n suhJNo371bJJfnTswYbIqcxGDCvMzxtI1fYMB/yOOyBguIQyBzaAiqhhxCX1m8jzV9ld mbtA== X-Gm-Message-State: AOJu0Yx3GCSKVxYVtsdsR3NswJV4rPXGghg4s02B4xTwMi8fEVZBq5UM 5tdiRPLdw7k5BDaTVVa6ARBVJ5U8ju/4az6peeDc7jeIZkLmZKIQ9j0OOpu+4kbz0IasgRTxISs v X-Gm-Gg: ASbGnctYqaG8nqyWXLh+tLaNqRok26DIE+PIFyqEx61KyNu7l2Jn4D6JhYbXaLGJlTx 8x39DMXcZkFE5i6HAIOJn+mI36gVq8XpdbLD5pp172BRP9mB33vF6Dnkf26WTy9Q64fFbuHebuq r0doYJ9+Z843F75kJXV91b5MfZP/WHf1N2gYAiaVSQfgzxUaRfdiyp3pNeY6fYpjYv5lC2ksIRP /1ZPFSVscF+k6+YvoYfOc3RC37CfjysxiHZqVzct4Kzo4L7dJ9tstOKAo4zoghVCAmahNBiaYhB LiPz/g== X-Google-Smtp-Source: AGHT+IEg4nw5+s101I0VPFmamTRXRATp+H74RFsy46oO+GiEIml+m/yT1+LNv9AMLaSkU3sWUF3lZA== X-Received: by 2002:a05:6402:5245:b0:5d3:ba42:e9fa with SMTP id 4fb4d7f45d1cf-5d81ddc01a0mr65295187a12.16.1735308941729; Fri, 27 Dec 2024 06:15:41 -0800 (PST) Received: from localhost (145-53-221-196.fixed.kpn.net. [145.53.221.196]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d80701cfdcsm10855769a12.89.2024.12.27.06.15.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 Dec 2024 06:15:40 -0800 (PST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8; format=Flowed Date: Fri, 27 Dec 2024 15:15:40 +0100 Message-Id: Cc: "Pgsql Hackers" Subject: Re: RFC: Allow EXPLAIN to Output Page Fault Information To: "Tom Lane" , "torikoshia" From: "Jelte Fennema-Nio" X-Mailer: aerc 0.18.2-128-g0f7d4fc4bce0 References: <1614321.1735055528@sss.pgh.pa.us> In-Reply-To: <1614321.1735055528@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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= =20 >> information during both the planning and execution phases of a query.=20 > > 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.