From: | "Bossart, Nathan" <bossartn(at)amazon(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Justin Pryzby <pryzby(at)telsasoft(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Magnus Hagander <magnus(at)hagander(dot)net>, Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>, Don Seiler <don(at)seiler(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Estimating HugePages Requirements? |
Date: | 2021-09-01 18:28:21 |
Message-ID: | 298B6D88-7B71-4E1B-BFC4-E7BF3A32960D@amazon.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-hackers |
On 8/31/21, 11:54 PM, "Michael Paquier" <michael(at)paquier(dot)xyz> wrote:
> Hmm. I am not sure about the addition of huge_pages_required, knowing
> that we would have shared_memory_size. I'd rather let the calculation
> part to the user with a scan of /proc/meminfo.
I included this based on some feedback from Andres upthread [0]. I
went ahead and split the patch set into 3 pieces in case we end up
leaving it out.
> +#elif defined(WIN32)
> + hp_size = GetLargePageMinimum();
> +#endif
> +
> +#if defined(MAP_HUGETLB) || defined(WIN32)
> + hp_required = (size_b / hp_size) + 1;
> As of [1], there is the following description:
> "If the processor does not support large pages, the return value is
> zero."
> So there is a problem here.
I've fixed this in v4.
Nathan
[0] https://postgr.es/m/20210827193813.oqo5lamvyzahs35o%40alap3.anarazel.de
Attachment | Content-Type | Size |
---|---|---|
v4-0001-Move-the-shared-memory-size-calculation-to-its-ow.patch | application/octet-stream | 7.1 KB |
v4-0003-Introduce-huge_pages_required-GUC.patch | application/octet-stream | 7.0 KB |
v4-0002-Introduce-shared_memory_size-GUC.patch | application/octet-stream | 8.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Mukesh Rajpurohit | 2021-09-02 04:08:40 | Postgresql.conf group ownership changed automatically |
Previous Message | Michael Paquier | 2021-09-01 06:53:52 | Re: Estimating HugePages Requirements? |
From | Date | Subject | |
---|---|---|---|
Next Message | Jacob Champion | 2021-09-01 18:43:08 | Re: [PATCH] Support pg_ident mapping for LDAP |
Previous Message | Tom Lane | 2021-09-01 17:27:35 | Re: Converting contrib SQL functions to new style |