Hi Jakub,

On Wed, Feb 26, 2025 at 09:48:41AM +0100, Jakub Wartak wrote:
> On Mon, Feb 24, 2025 at 5:11 PM Bertrand Drouvot
> <bertranddrouvot...@gmail.com> wrote:
> >
> > Hi,
> >
> > On Mon, Feb 24, 2025 at 09:06:20AM -0500, Andres Freund wrote:
> > > Does the issue with "new" backends seeing pages as not present exist both 
> > > with
> > > and without huge pages?
> >
> > That's a good point and from what I can see it's correct with huge pages 
> > being
> > used (it means all processes see the same NUMA node assignment regardless of
> > access patterns).
> 
> Hi Bertrand , please see that nearby thread. I've got quite the
> opposite results. I need page-fault memory or I get invalid results
> ("-2"). What kernel version are you using ? (I've tried it on two
> 6.10.x series kernels , virtualized in both cases; one was EPYC [real
> NUMA, but not VM so not real hardware])

Thanks for sharing your numbers!

It looks like that with hp enabled then the shared_buffers plays a role.

1. With hp, shared_buffers 4GB:

 huge_pages_status
-------------------
 on
(1 row)

 shared_buffers
----------------
 4GB
(1 row)

NOTICE:  os_page_count=2048 os_page_size=2097152 pages_per_blk=0.003906
 numa_zone_id | count
--------------+--------
              | 507618
            0 |   1054
           -2 |  15616
(3 rows)

2. With hp, shared_buffers 23GB:

 huge_pages_status
-------------------
 on
(1 row)

 shared_buffers
----------------
 23GB
(1 row)

NOTICE:  os_page_count=11776 os_page_size=2097152 pages_per_blk=0.003906
 numa_zone_id |  count
--------------+---------
              | 2997974
            0 |   16682
(2 rows)

3. no hp, shared_buffers 23GB:

 huge_pages_status
-------------------
 off
(1 row)

 shared_buffers
----------------
 23GB
(1 row)

ERROR:  extension "pg_buffercache" already exists
NOTICE:  os_page_count=6029312 os_page_size=4096 pages_per_blk=2.000000
 numa_zone_id |  count
--------------+---------
              | 2997975
           -2 |   16482
            1 |     199
(3 rows)

Maybe the kernel is taking some decisions based on the HugePages_Rsvd, I've
no ideas. Anyway there is little than we can do and the "touchpages" patch
seems to provide "accurate" results.

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com


Reply via email to