public inbox for [email protected]  
help / color / mirror / Atom feed
From: Ashutosh Bapat <[email protected]>
To: Matthias van de Meent <[email protected]>
Cc: Heikki Linnakangas <[email protected]>
Cc: Robert Haas <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: pgsql-hackers <[email protected]>
Cc: [email protected]
Subject: Re: Better shared data structure management and resizable shared data structures
Date: Sun, 5 Apr 2026 19:46:51 +0530
Message-ID: <CAExHW5sdRv_BEmskRafZN26eVcR8qoLRDp0bJR=znquhigZUNQ@mail.gmail.com> (raw)
In-Reply-To: <CAExHW5u=zdSntmd9hhrMFDQP5n15Rz+JMRYHyo1FNwXE5LsuDg@mail.gmail.com>
References: <CAExHW5vM1bneLYfg0wGeAa=52UiJ3z4vKd3AJ72X8Fw6k3KKrg@mail.gmail.com>
	<[email protected]>
	<CA+TgmoauqYXm8iA3FGRAVKxYShUxWBiS_MSLmQpTrmO7wNHamw@mail.gmail.com>
	<[email protected]>
	<CAExHW5uTNWOSxJDWQAUnS0tZawob2_J3dRAtc67NHNZ98X4_xA@mail.gmail.com>
	<CAExHW5t439y61YD9bc7d5wZWHp6J=M43Qu3eEZOBPguZML7o2A@mail.gmail.com>
	<CAExHW5v5FVZbsO9sLzztMZ11C3hgGStE=HkkV2bQkCyncess4w@mail.gmail.com>
	<[email protected]>
	<CAExHW5tCC0T1ky=Jnq-AvMxa67Adaw7aQ4iQAO=BSdHcbSNBVg@mail.gmail.com>
	<[email protected]>
	<CAExHW5tS7GncN90oJWOSzW_3F1EHL9xwe59L7Req3nUVgmObUw@mail.gmail.com>
	<[email protected]>
	<CAEze2WhMOHVgH2Xeyzx=VEk-Ta_YnQUqT+TdBiv5Lx8ESn2WZA@mail.gmail.com>
	<CAExHW5s6h=c_q2m72Nvyj1ghMEhPkOBkeN5Htn7YR=1BrNN-Sw@mail.gmail.com>
	<[email protected]>
	<CAEze2WjQZff3znd6CtG-OBzYZMMqy5TyQSoAo=QTFT38tDndeQ@mail.gmail.com>
	<[email protected]>
	<CAExHW5twYLhVjtApX3osdaz-4b0Tjvjj_Zr20orUb61qgiJmUw@mail.gmail.com>
	<CAExHW5stth2mdXh3ukn9rWJ+Pruoat+5tY3CYyM6KGqH2G30fQ@mail.gmail.com>
	<CAEze2WiD7m+A+3OrAK0JU265BZ4P48_AuKY-X5siJ=294tBeDQ@mail.gmail.com>
	<CAExHW5u=zdSntmd9hhrMFDQP5n15Rz+JMRYHyo1FNwXE5LsuDg@mail.gmail.com>

On Sun, Apr 5, 2026 at 4:50 PM Ashutosh Bapat
<[email protected]> wrote:
>

> 3. The test fails one one machine because RssShmem is consistently 8MB
> higher than the allocated_size in all cases. I guess it is because of
> huge page setting. Adding huge_pages = off to the test configuration.
> I think the test can not rely on huge pages anyway since
> allocated_size isn't aligned to huge page size.

Turning huge_pages = off didn't help. The test actually creates a
resizable shared memory structure which is 100s of MBs and adjusts
GUCs so that very minimum shared memory is allocated. This way the
resizable structure dominates the shared memory segment. Any small
variations in RssShmem because of parts of shared memory not accessed
by a backend can be ignored. Then it expects that the RssShmem of a
backend <= sum(allocated_size) from pg_shmem_allocations; usually
sum(allocated_size) - RssShmem ~= 2MB. That's not accurate but it's
the closest I can get to make sure that we do not over allocate memory
for resizable shared structures. There is something on
https://cirrus-ci.com/task/5501660157444096 which is mapping shared
memory worth 10MB, other than the main shared memory segment,
consistently in all the backends. Because of that RssShmem -
sum(allocated_size) is consistently ~= 8MB. I am not able to figure
out where that 10MB is coming from. If we could know that, we could
either disable the test on that machine or disable that allocation. On
all other CFBot VMs, the test is passing, including the platforms
where the feature is not supported.

-- 
Best Wishes,
Ashutosh Bapat





view thread (82+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Better shared data structure management and resizable shared data structures
  In-Reply-To: <CAExHW5sdRv_BEmskRafZN26eVcR8qoLRDp0bJR=znquhigZUNQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox