Re: pgsql: Introduce pg_shmem_allocations_numa view

From: Tomas Vondra <tomas(at)vondra(dot)me>
To: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Cc: Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com>, Christoph Berg <myon(at)debian(dot)org>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, 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 12:53:41
Message-ID: 7ad46be6-853b-4b58-8f59-3186d248e613@vondra.me
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 6/25/25 14:42, Álvaro Herrera wrote:
> On 2025-Jun-25, Tomas Vondra wrote:
>
>> Not sure. I thought NUMA doesn't matter very much on 32-bit systems too,
>> exactly because those systems tend to use small amounts of memory. But
>> then while investigating this issue I realized even rpi5 has NUMA, in
>> fact it has a whopping 8 nodes:
>>
>> debian(at)raspberry-32:~ $ numactl --hardware
>> available: 8 nodes (0-7)
>
> Interesting. Mine only shows a single node.
>
> alvherre(at)amras:~ $ uname -a
> Linux amras 6.12.25+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.12.25-1+rpt1 (2025-04-30) aarch64 GNU/Linux
> alvherre(at)amras:~ $ sudo numactl --hardware
> available: 1 nodes (0)
> node 0 cpus: 0 1 2 3
> node 0 size: 8051 MB
> node 0 free: 202 MB
> node distances:
> node 0
> 0: 10
> alvherre(at)amras:~ $ sudo lscpu
> Architecture: aarch64
> CPU op-mode(s): 32-bit, 64-bit
> Byte Order: Little Endian
> CPU(s): 4
> On-line CPU(s) list: 0-3
> Vendor ID: ARM
> Model name: Cortex-A76
> Model: 1
> Thread(s) per core: 1
> Core(s) per cluster: 4
> Socket(s): -
> Cluster(s): 1
> Stepping: r4p1
> CPU(s) scaling MHz: 62%
> CPU max MHz: 2400.0000
> CPU min MHz: 1500.0000
> BogoMIPS: 108.00
> Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp
> asimdhp cpuid asimdrdm lrcpc dcpop asimddp
> [...]
> NUMA:
> NUMA node(s): 1
> NUMA node0 CPU(s): 0-3
>
>
> Did you enable something special on it maybe?
>
> ... Oh, I found this:
> https://www.jeffgeerling.com/blog/2024/numa-emulation-speeds-pi-5-and-other-improvements
> Sounds like you have this in your system and I don't in mine.
>

I don't think I had to enable anything special. On the machine running
32-bit RaspberryPi OS I had to install a newer kernel, but I don't
recall doing anything else. I certainly did not apply any kernel patches
or anything like that.

And it seems one of the rpi machines has exactly the same kernel version:

Linux raspberry-64 6.12.25+rpt-rpi-2712 #1 SMP PREEMPT Debian
1:6.12.25-1+rpt1 (2025-04-30) aarch64 GNU/Linux

So I wonder what's going on, why there's no NUMA on your rpi.

--
Tomas Vondra

Attachment Content-Type Size
rpi.log text/x-log 5.8 KB

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message vignesh C 2025-06-25 16:52:02 Re: pgsql: Improve runtime and output of tests for replication slots checkp
Previous Message Álvaro Herrera 2025-06-25 12:42:49 Re: pgsql: Introduce pg_shmem_allocations_numa view

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2025-06-25 13:36:34 Re: pg_dump misses comments on NOT NULL constraints
Previous Message Álvaro Herrera 2025-06-25 12:42:49 Re: pgsql: Introduce pg_shmem_allocations_numa view