Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nj07t-00044e-F9 for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Apr 2022 14:55:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nj07r-0001Ub-JZ for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Apr 2022 14:55:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nj07r-0001US-4J for pgsql-hackers@lists.postgresql.org; Mon, 25 Apr 2022 14:55:43 +0000 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nj07n-0001Ik-TJ for pgsql-hackers@postgresql.org; Mon, 25 Apr 2022 14:55:42 +0000 Received: by mail-lj1-x232.google.com with SMTP id q185so8969716ljb.5 for ; Mon, 25 Apr 2022 07:55:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hagander-net.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7PDxpEJcV3ntCbXXKWTZOElRszPEaBmToQfv2E57BKA=; b=rw0N9tg6eT3v//bPeC/IaL8a4X3yK0pzhA3SpdZJpTNlq8uuNKI0KqPYreHdDAtmm9 ddwcA/7q9RvblOasJR1fe94Gy8S10LH8FvpIXX+28LCm+IL3Cxc8GEIwzPrFr1H7lAkE AoURih5L4+LnxCXk9PMPfLy6/csdtFn8R2lh3bApS9LSxRwqC2RErWJnQ96ZXIzH3wvG dejYK482wylHADvyknaQyRpNesVQTKa1/2M9T/8XpNa5QmR+6YMmhsAJhaPO7ObsrwK+ KM7ghXBJMfTbi0FPuUBSekMpMu7m0EXd7CuNHRHz4ub3pKQwcbn4OfXRIKYcEoUC2WsQ M4VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7PDxpEJcV3ntCbXXKWTZOElRszPEaBmToQfv2E57BKA=; b=ettBncBP1XKgoed93XPP4Wp7asGvJXHKzkRPTlqSTC0j+DPmrEbyyWRt6W2UkPvypH KD8Ih4Qw56ZnAVRuoWPXFsWznajTszOD56OPg/cMzD+dD0o7DG92cFvggYFGf2HTKGnb wlJHrr9oLWDl4oUBB0YG8PER0OBYPjaMXXpWTXpCpfQ5SpX7u2agzc8vD0kbcRu+XhQi j5wh8PQJG8XGa+cmbyGfOSyuu7NKI1MEf1MiYfMbAxMHpJzadkGmlQ4UYXdv53CGXtKZ 75P+euZpG1erHGb1k1C1f3H0PV3WmnXxUJKiP6LM/8rHl76XV9FwSzMgQNyvto3WXlQ0 iRFQ== X-Gm-Message-State: AOAM532Ejm4NPsUVrJLlezHzDwyqZHuOJho0nG0u0FSGujoImQlCuAgY yaW9cn8tPIvJvbe6o4tU36hqIYfehtoy9W6h5r93JQ== X-Google-Smtp-Source: ABdhPJzh9zSr7NBuNdO0mlye/p/HVEoHrI5YW/nMB6n2dJHNFOHeDye57IHMmvaPXjwa66acvBRK3hkYzHdHodJiivM= X-Received: by 2002:a2e:9e11:0:b0:24c:5677:8b20 with SMTP id e17-20020a2e9e11000000b0024c56778b20mr11518108ljk.430.1650898537499; Mon, 25 Apr 2022 07:55:37 -0700 (PDT) MIME-Version: 1.0 References: <6AE0285D-0917-4C05-B6AA-4AEDD2FCBA52@amazon.com> <20220314173417.GA1020555@nathanxps13> <20220315224439.GA1133771@nathanxps13> In-Reply-To: From: Magnus Hagander Date: Mon, 25 Apr 2022 16:55:25 +0200 Message-ID: Subject: Re: Estimating HugePages Requirements? To: Michael Paquier Cc: Nathan Bossart , "Bossart, Nathan" , Fujii Masao , Justin Pryzby , Andres Freund , Mark Dilger , Don Seiler , PostgreSQL-development Content-Type: multipart/alternative; boundary="000000000000e3610b05dd7bc45c" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000e3610b05dd7bc45c Content-Type: text/plain; charset="UTF-8" On Mon, Apr 25, 2022 at 2:15 AM Michael Paquier wrote: > On Fri, Apr 22, 2022 at 09:49:34AM +0200, Magnus Hagander wrote: > > I agree that thats a very narrow use case. And I'm not sure the use case > of > > a running server is even that important here - it's really the offline > one > > that's important. Or rather, the really compelling one is when there is a > > server running but I want to check the value offline because it will > > change. SHOW doesn't help there because it shows the value based on the > > currently running configuration, not the new one after a restart. > > You mean the case of a server where one would directly change > postgresql.conf on a running server, and use postgres -C to see how > much the kernel settings need to be changed before the restart? > Yes. AIUI that was the original use-case for this feature. It certainly was for me :) > Hmm. So what's the solution on windows? I guess maybe it's not as > important > > there because there is no limit on huge pages, but generally getting the > > expected shared memory usage might be useful? Just significantly less > > important. > > 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? -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/ --000000000000e3610b05dd7bc45c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Apr 25, 2022 at 2:15 AM Michael P= aquier <michael@paquier.xyz&g= t; wrote:
On Fri, Apr 22, 2022 at 09:49:34AM +0200, Magnus Hagan= der wrote:
> I agree that thats a very narrow use case. And I'm not sure the us= e case of
> a running server is even that important here - it's really the off= line one
> that's important. Or rather, the really compelling one is when the= re is a
> server running but I want to check the value offline because it will > change. SHOW doesn't help there because it shows the value based o= n the
> currently running configuration, not the new one after a restart.

You mean the case of a server where one would directly change
postgresql.conf on a running server, and use postgres -C to see how
much the kernel settings need to be changed before the restart?

Yes.

AIUI that was the or= iginal use-case for this feature. It certainly was for me :)

=


> Hmm. So what's the solution on windows? I guess maybe it's not= as important
> there because there is no limit on huge pages, but generally getting t= he
> expected shared memory usage might be useful? Just significantly less<= br> > important.

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?=C2=A0 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.=C2=A0 Exactly wha= t the use-cases are can vary, but surely they would have the same problems = wrt redirects?


--
=C2=A0Magnus Hagander<= br>=C2=A0Me: https:/= /www.hagander.net/
=C2=A0Work: https://www.redpill-linpro.com/
--000000000000e3610b05dd7bc45c--