Re: pgsql: Introduce pg_shmem_allocations_numa view

From: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Christoph Berg <myon(at)debian(dot)org>
Cc: Tomas Vondra <tomas(at)vondra(dot)me>, Andres Freund <andres(at)anarazel(dot)de>, Tomas Vondra <tomas(dot)vondra(at)postgresql(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Introduce pg_shmem_allocations_numa view
Date: 2025-06-25 06:11:21
Message-ID: aFuTCXhRMLjydpmg@ip-10-97-1-34.eu-west-3.compute.internal
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Bertrand Drouvot 2025-06-25 06:45:55 Re: pgsql: Introduce pg_shmem_allocations_numa view
Previous Message Bertrand Drouvot 2025-06-25 06:05:21 Re: pgsql: Introduce pg_shmem_allocations_numa view

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry 2025-06-25 06:11:37 IPC/MultixactCreation on the Standby server
Previous Message Bertrand Drouvot 2025-06-25 06:05:21 Re: pgsql: Introduce pg_shmem_allocations_numa view