| From: | Tomas Vondra <tomas(at)vondra(dot)me> |
|---|---|
| To: | Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com> |
| Cc: | Alexey Makhmutov <a(dot)makhmutov(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de> |
| Subject: | Re: Adding basic NUMA awareness |
| Date: | 2025-11-21 18:49:25 |
| Message-ID: | 5bc6d309-61fe-4d8b-9e1f-a2961564a559@vondra.me |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
Here's an updated version of the patch series.
It fixes a bunch of issues in pg_buffercache_pages.c - duplicate attnums
and a incorrect array length.
The main change is in 0006 - it sets the default allocation policy for
shmem to interleaving, before doing the explicit partitioning for shared
buffers. It does it by calling numa_set_membind before the mmap(), and
then numa_interleave_memory() on the allocated shmem. It does this to
allow using MAP_POPULATE - but that's commented out by default.
This does seem to solve the SIGBUS failures for me. I still think there
might be a small chance of hitting that, because of locating an extra
"boundary" page on one of the nodes. But it should be solvable by
reserving a couple more pages.
Jakub, what do you think?
regards
--
Tomas Vondra
| Attachment | Content-Type | Size |
|---|---|---|
| v20251121-0007-NUMA-partition-PGPROC.patch | text/x-patch | 49.2 KB |
| v20251121-0006-NUMA-shared-buffers-partitioning.patch | text/x-patch | 46.8 KB |
| v20251121-0005-clock-sweep-weighted-balancing.patch | text/x-patch | 5.2 KB |
| v20251121-0004-clock-sweep-scan-all-partitions.patch | text/x-patch | 6.7 KB |
| v20251121-0003-clock-sweep-balancing-of-allocations.patch | text/x-patch | 25.3 KB |
| v20251121-0002-clock-sweep-basic-partitioning.patch | text/x-patch | 33.4 KB |
| v20251121-0001-Infrastructure-for-partitioning-shared-buf.patch | text/x-patch | 14.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2025-11-21 18:52:07 | Re: Optimize cardinality estimation when unique keys are fully covered |
| Previous Message | Etsuro Fujita | 2025-11-21 18:35:17 | Re: Import Statistics in postgres_fdw before resorting to sampling. |