From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
---|---|
To: | "Shinoda, Noriyoshi (PN Japan FSIP)" <noriyoshi(dot)shinoda(at)hpe(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, "masao(dot)fujii(at)oss(dot)nttdata(dot)com" <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, "rjuju123(at)gmail(dot)com" <rjuju123(at)gmail(dot)com>, "tgl(at)sss(dot)pgh(dot)pa(dot)us" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com> |
Subject: | Re: Improve logging when using Huge Pages |
Date: | 2021-10-29 07:00:47 |
Message-ID: | CAD21AoCp6mbAvrXTTxcKrseYccsCjXFDdr3Vo+natFznpNkNBA@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Oct 27, 2021 at 3:40 PM Shinoda, Noriyoshi (PN Japan FSIP)
<noriyoshi(dot)shinoda(at)hpe(dot)com> wrote:
>
> Hi,
> Thank you for your comment.
> The attached patch stops message splitting.
> This patch also limits the timing of message output when huge_pages = try and HugePages is not used.
>
I've looked at the patch. Here are comments:
if (huge_pages == HUGE_PAGES_TRY && ptr == MAP_FAILED)
elog(DEBUG1, "mmap(%zu) with MAP_HUGETLB
failed, huge pages disabled: %m",
allocsize);
+ else
+ with_hugepages = true;
ISTM the name with_hugepages could lead to confusion since it can be
true even if mmap failed and huge_pages == HUGE_PAGES_ON.
Also, with the patch, the log message is emitted also during initdb
and starting up in single user mode:
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Asia/Tokyo
creating configuration files ... ok
running bootstrap script ... 2021-10-29 15:45:51.408 JST [55101] LOG:
Anonymous shared memory was allocated without huge pages.
ok
performing post-bootstrap initialization ... 2021-10-29 15:45:53.326
JST [55104] LOG: Anonymous shared memory was allocated without huge
pages.
ok
syncing data to disk ... ok
Which is noisy. Perhaps it's better to log it only when
IsPostmasterEnvironment is true.
Regards,
--
Masahiko Sawada
EDB: https://www.enterprisedb.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2021-10-29 08:10:04 | Re: Multi-Column List Partitioning |
Previous Message | Michael Paquier | 2021-10-29 06:52:30 | Re: inefficient loop in StandbyReleaseLockList() |