pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
To: Christoph Berg <myon@debian.org>
Cc: Tomas Vondra <tomas@vondra.me>
Cc: Andres Freund <andres@anarazel.de>
Cc: Tomas Vondra <tomas.vondra@postgresql.org>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: pgsql: Introduce pg_shmem_allocations_numa view
Date: Wed, 25 Jun 2025 06:11:21 +0000
Message-ID: <aFuTCXhRMLjydpmg@ip-10-97-1-34.eu-west-3.compute.internal> (raw)
In-Reply-To: <aFrEesaN9YlV0RrJ@msg.df7cb.de>
References: <cd16c4a3-2860-46de-a74e-5532d1b2ee39@vondra.me>
	<6342f601-77de-4ee0-8c2a-3deb50ceac5b@vondra.me>
	<aFpg1de9ZfS1QgUt@ip-10-97-1-34.eu-west-3.compute.internal>
	<a3a4fe3d-1a80-4e03-aa8e-150ee15f6c35@vondra.me>
	<aFqHoNXQ/uWKXJ4U@ip-10-97-1-34.eu-west-3.compute.internal>
	<8649a4e3-c60d-4f37-aa6f-e7e7c14c581e@vondra.me>
	<aFqnM/iiL+MB62dG@ip-10-97-1-34.eu-west-3.compute.internal>
	<aFq5HQj016rVS2lm@msg.df7cb.de>
	<8961c087-e49b-4b16-9437-31331625215c@vondra.me>
	<aFrEesaN9YlV0RrJ@msg.df7cb.de>

Hi,

On Tue, Jun 24, 2025 at 05:30:02PM +0200, Christoph Berg wrote:
> Re: Tomas Vondra
> > If it's a reliable fix, then I guess we can do it like this. But won't
> > that be a performance penalty on everyone? Or does the system split the
> > array into 16-element chunks anyway, so this makes no difference?
> 
> There's still the overhead of the syscall itself. But no idea how
> costly it is to have this 16-step loop in user or kernel space.
> 
> We could claim that on 32-bit systems, shared_buffers would be smaller
> anyway, so there the overhead isn't that big. And the step size should
> be larger (if at all) on 64-bit.

Right, and we already mention in the doc that using those views is "very slow"
or "can take a noticeable amount of time".

> > Anyway, maybe we should start by reporting this to the kernel people. Do
> > you want me to do that, or shall one of you take care of that? I suppose
> > that'd be better, as you already wrote a fix / know the code better.
> 
> Submitted: https://marc.info/?l=linux-mm&m=175077821909222&w=2

Thanks! I had in mind to look at how to report such a bug and provide a patch
but you beat me to it.

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com





view thread (54+ messages)  latest in thread

Message-ID: <aFuTCXhRMLjydpmg@ip-10-97-1-34.eu-west-3.compute.internal>
Permalink:  ../aFuTCXhRMLjydpmg@ip-10-97-1-34.eu-west-3.compute.internal/
Also on:    postgresql.org/message-id/aFuTCXhRMLjydpmg@ip-10-97-1-34.eu-west-3.compute.internal

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: bertranddrouvot.pg@gmail.com, myon@debian.org, tomas@vondra.me, andres@anarazel.de, tomas.vondra@postgresql.org, pgsql-hackers@lists.postgresql.org
  Subject: Re: pgsql: Introduce pg_shmem_allocations_numa view
  In-Reply-To: <aFuTCXhRMLjydpmg@ip-10-97-1-34.eu-west-3.compute.internal>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox