Re: Draft for basic NUMA observability

From: Tomas Vondra <tomas(at)vondra(dot)me>
To: Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com>
Cc: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Draft for basic NUMA observability
Date: 2025-04-04 19:25:57
Message-ID: ce8903b2-8cf7-43c9-bd50-9675c256da39@vondra.me
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

OK,

here's v25 after going through the patches once more, fixing the issues
mentioned by Bertrand, etc. I think 0001 and 0002 are fine, I have a
couple minor questions about 0003.

0002
----
- Adds the new types to typedefs.list, to make pgindent happy.
- Improves comment for pg_buffercache_numa_pages
- Minor formatting tweaks.

- I was wondering if maybe we should have some "global ID" of memory
page, so that with large memory pages it's indicated the buffers are on
the same memory page. Right now each buffer starts page_num from 0, but
it should not be very hard to have a global counter. Opinions?

0003
----
- Minor formatting tweaks, comment improvements.
- Isn't this comment a bit confusing / misleading?

/* Get number of OS aligned pages */

AFAICS the point is to adjust the allocated_size to be a multiple of
os-page_size, to get "all" memory pages the segment uses. But that's not
what I understand by "aligned page" (which is about there the page is
expected to start). Or did I get this wrong?

- 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 ...

regards

--
Tomas Vondra

Attachment Content-Type Size
v25-0001-Add-support-for-basic-NUMA-awareness.patch text/x-patch 22.1 KB
v25-0002-Add-pg_buffercache_numa-view-with-NUMA-node-info.patch text/x-patch 20.0 KB
v25-0003-review.patch text/x-patch 3.7 KB
v25-0004-Introduce-pg_shmem_allocations_numa-view.patch text/x-patch 16.4 KB
v25-0005-review.patch text/x-patch 4.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Konstantin Knizhnik 2025-04-04 19:27:45 Re: New criteria for autovacuum
Previous Message Andres Freund 2025-04-04 19:16:18 Re: AIO v2.5