public inbox for [email protected]  
help / color / mirror / Atom feed
From: Michael Paquier <[email protected]>
To: Magnus Hagander <[email protected]>
Cc: Nathan Bossart <[email protected]>
Cc: Bossart, Nathan <[email protected]>
Cc: Fujii Masao <[email protected]>
Cc: Justin Pryzby <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: Mark Dilger <[email protected]>
Cc: Don Seiler <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Subject: Re: Estimating HugePages Requirements?
Date: Tue, 26 Apr 2022 10:34:06 +0900
Message-ID: <YmdMDiCCyVJLlB/[email protected]> (raw)
In-Reply-To: <CABUevEyD_aLM=oXi1jj8hRN=7aJq--jN4FP+ehY8Vu60+QH61A@mail.gmail.com>
References: <20220314173417.GA1020555@nathanxps13>
	<Yi/[email protected]>
	<CABUevExgoKMNveD5SvFWOYA4MQvPkDmGxY7DkVRASJED4gBYog@mail.gmail.com>
	<20220315224439.GA1133771@nathanxps13>
	<[email protected]>
	<CABUevEyExSDrtZ4wU19iX4yvgExR1EpjFKB4ExFQDgTAvAHFyg@mail.gmail.com>
	<[email protected]>
	<CABUevEwPPxR-SD55UWDLZuLa2UVGY+OQpVPPvO82X10MU_hLcA@mail.gmail.com>
	<[email protected]>
	<CABUevEyD_aLM=oXi1jj8hRN=7aJq--jN4FP+ehY8Vu60+QH61A@mail.gmail.com>

On Mon, Apr 25, 2022 at 04:55:25PM +0200, Magnus Hagander wrote:
> AIUI that was the original use-case for this feature. It certainly was for
> me :)

Perhaps we'd be fine with relaxing the requirements here knowing that
the control file should never be larger than PG_CONTROL_MAX_SAFE_SIZE
(aka the read should be atomic so it could be made lockless).  At the
end of the day, to be absolutely correct in the shmem size estimation,
I think that we are going to need what's proposed here or the sizing
may not be right depending on how extensions adjust GUCs after they
load their _PG_init():
https://www.postgresql.org/message-id/20220419154658.GA2487941@nathanxps13

That's a bit independent, but not completely unrelated either
depending on how exact you want your number of estimated huge pages to
be.  Just wanted to mention it.

>> Contrary to Linux, we don't need to care about the number of large
>> pages that are necessary because there is no equivalent of
>> vm.nr_hugepages on Windows (see [1]), do we?  If that were the case,
>> we'd have a use case for huge_page_size, additionally.
> 
> Right, for this one in particular -- that's what I meant with my comment
> about there not being a limit. But this feature works for other settings as
> well, not just the huge pages one.  Exactly what the use-cases are can
> vary, but surely they would have the same problems wrt redirects?

Yes, the redirection issue would apply to all the run-time GUCs.
--
Michael


Attachments:

  [application/pgp-signature] signature.asc (833B, 2-signature.asc)
  download

view thread (108+ 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], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Estimating HugePages Requirements?
  In-Reply-To: <YmdMDiCCyVJLlB/[email protected]>

* 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