Re: Draft for basic NUMA observability
Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
From: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
To: Tomas Vondra <tomas@vondra.me>
Cc: Jakub Wartak <jakub.wartak@enterprisedb.com>, Andres Freund <andres@anarazel.de>, Alvaro Herrera <alvherre@alvh.no-ip.org>, Nazir Bilal Yavuz <byavuz81@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2025-04-05T17:14:32Z
Lists: pgsql-hackers
Hi, On Sat, Apr 05, 2025 at 03:23:38PM +0200, Tomas Vondra wrote: > Something like that. But I think it should be "align the size of ...", > we're not aligning the start. > > >> - There's a comment at the end which talks about "ignored segments". > >> IMHO that type of information should be in the function comment, > >> but I'm > >> also not quite sure I understand what "output shared memory" is ... > > > > I think that comes from the comments that are already in > > pg_get_shmem_allocations(). > > > > I think that those are located here and worded that way to ease to understand > > what is not in with pg_get_shmem_allocations_numa() if one look at both > > functions. That said, I'm +1 to put this kind of comments in the function comment. > > > > OK. But I'm still not sure what "output shared memory" is about. Can you > explain what shmem segments are not included? Looking at pg_get_shmem_allocations() and the pg_shmem_allocations view documentation, I would say the wording is linked to "anonymous allocations" and "unused memory" (i.e the ones reported with <anonymous> or NULL as name in the pg_shmem_allocations view). Using output in this comment sounds confusing while it makes sense in pg_get_shmem_allocations() because it really reports those. I think that we could just mention in the function comment that pg_get_shmem_allocations_numa() does not handle anonymous allocations and unused memory. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
doc: Correct pg_shmem_allocations_numa.size data type
- b8a6078ca8f4 18.0 landed
-
Add pg_buffercache_numa view with NUMA node info
- ba2a3c2302f1 18.0 landed
-
Add support for basic NUMA awareness
- 65c298f61fc7 18.0 landed
-
Introduce pg_shmem_allocations_numa view
- 8cc139bec34a 18.0 landed