Re: Improve logging when using Huge Pages

Поиск
Список
Период
Сортировка
От Masahiko Sawada
Тема Re: Improve logging when using Huge Pages
Дата
Msg-id CAD21AoCp6mbAvrXTTxcKrseYccsCjXFDdr3Vo+natFznpNkNBA@mail.gmail.com
обсуждение исходный текст
Ответ на RE: Improve logging when using Huge Pages  ("Shinoda, Noriyoshi (PN Japan FSIP)" <noriyoshi.shinoda@hpe.com>)
Ответы Re: Improve logging when using Huge Pages  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Список pgsql-hackers
On Wed, Oct 27, 2021 at 3:40 PM Shinoda, Noriyoshi (PN Japan FSIP)
<noriyoshi.shinoda@hpe.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/



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: inefficient loop in StandbyReleaseLockList()
Следующее
От: Amit Langote
Дата:
Сообщение: Re: Multi-Column List Partitioning